In java: ( no stringbuild or chart.append) the program must produce a neatly labeled bar chart depicting the relative values to each other. Note that there is no interactive input and no use of command line arguments. The program at this stage uses values programmed directly into it. The program output must include the original values as well as the bars. The example below shows the relative number of performances of some Broadway musicals (in picture) You choose the width of the chart. In the example above, it's 60, but it can be different. The largest value in your set should use the entire width, the rest of the bars will be proportionately shorter. Since you're assigning the values in the program, you know the maximum and no special logic is required to find it You must compute and display the "scale" of the chart (i.e. how many units one bar symbol represents) Each bar is labeled with the entity and value You may choose any symbol for your bars 3. In addition to the above requirements, your solution must make use of an array (or ArrayList) to store the values and a second array (or ArrayList) for the labels. The solution must also make use of a function to create a single bar, using call statements to execute the function for different bars. 4. in addition to the requirements , the program must get an output file name from the command line and save the chart to a file with that name. It is not necessary to also print the chart to the terminal, but it's okay if it the chart goes to both the terminal and to the file.
In java: ( no stringbuild or chart.append)
-
the
program must produce a neatly labeled bar chart depicting the relative values to each other. Note that there is no interactive input and no use of command line arguments. The program at this stage uses values programmed directly into it. The program output must include the original values as well as the bars. The example below shows the relative number of performances of some Broadway musicals (in picture)
-
You choose the width of the chart. In the example above, it's 60, but it can be different. The
largest value in your set should use the entire width, the rest of the bars will be proportionately
shorter.
-
Since you're assigning the values in the program, you know the maximum and no special logic is
required to find it
-
You must compute and display the "scale" of the chart (i.e. how many units one bar symbol represents)
-
Each bar is labeled with the entity and value
-
You may choose any symbol for your bars
3. In addition to the above requirements, your solution must make use of an array (or ArrayList) to store the values and a second array (or ArrayList) for the labels. The solution must also make use of a function to create a single bar, using call statements to execute the function for different bars.
4. in addition to the requirements , the program must get an output file name from the command line and save the chart to a file with that name. It is not necessary to also print the chart to the terminal, but it's okay if it the chart goes to both the terminal and to the file.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images