Question: The Filter. java program requires three parameters. One parameter determines how many input numbers get grouped together. Another parameter determines the number of output columns.

The Filter. java program requires three parameters. One parameter determines how many input numbers get grouped together. Another parameter determines the number of output columns. And another parameter determines the number of digits that are printed after a decimal point (this is called the precision of a decimal number).
The input numbers should be "right justified" in each output column, which means that all the decimal points in a column should line up vertically. The total width of an output column is 4+1+ precision characters. There should always be exactly two spaces between the output columns. Each group of numbers should be separated by a blank line.
In Filter.java, the default number of output columns should be three. If the properties file filter.properties exits in the current directory, and if that properties files contains a key with the name "columns", then the value of the "columns" key overrides the default number of output columns. If there is an environment variable called CS336_COLUMNS, then the value of that environment variable overrides the default number of columns and the number of columns set by the properties file (if it exits). If there is a first command-line argument, then that command-line argument overrides the environment variable (if there is one), the properties file (if it exits), and the default number of columns.
The decimal points of all the numbers in an output column must line up. You line up the decimal points by calling the printf method with an appropriate format string. The number of digits after a decimal point is called the precision of a decimal number. All the numbers in the output will have the same precision. Not all of the numbers in a column will have the same number of digits. Each number in a column should be padded with spaces on the left of the number to fill up its column.
In Filter.java, the default precision for your output numbers is 13 decimal places. If the properties file filter.properties exits in the current directory, and if that properties files contains a key with the name "precision", then the value of the "precision" key overrides the default precision. If there is an environment variable called CS336_PRECISION, then the value of that environment variable overrides the default precision and the precision set by the properties file (if it exits). If there is a second command-line parameter, then that commandline parameter overrides the environment variable (if there is one), the properties file (if it exits), and the default value of precision.
The input numbers should be combined into groups with the members of each group being formatted into the appropriate number of columns and with a blank line separating each group. In Filter.java the default length of a group should be 0, which means that all the input numbers should be placed in a single group. If the properties file filter.properties exits in the current directory, and if that properties files contains a key with the name "groups", then the value of the "groups" key overrides the default length for groups. If there is an environment variable called CS336_GROUPS, then the value of that variable overrides the default length and the length set by the property file (if it exits). If there is a third command-line
 The Filter. java program requires three parameters. One parameter determines how

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!