In java: 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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

In java:

  1. 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.

codio@extra-mister:~/workspace$ java ChartMaker_v1_c
Welcome to the Chart Maker, vl
--<<== Number of Performances of Broadway Musicals ==>>--
Chart width is: 60
Max value is: 6,836 performances
One 1*1 represents 114 performances
******** (1,019) Damn Yankees, 1955
********
***********.
·★★★★★★★★★★★ (3,242) Fiddler on the Roof, 1964
★★★★★★★★★★★★★★★★★★★★★★★★★★*☆
************* (1,521) Dreamgirls, 1981
****** (765) Into the Woods, 1987
★★★★★★★★★★★★★★★★★★★★★
★★★★★★★★★★★★★★★★★★★★★★★ (5,461) Beauty and the Beast, 1994
************************************************************ (6,836) Wicked, 2003
********* (1,066) Spider-Man: Turn Off the Dark, 2011
********************* (2,506) Aladdin, 2014
★★★★★★★★★★★★**** (1,919) Hamilton, 2015
*********** (1,363) Dear Evan Hansen, 2016
***** (6,137) A Chorus Line, 1975
Thanks for using the Chart Maker, v1
codio@extra-mister:~/workspace $
Transcribed Image Text:codio@extra-mister:~/workspace$ java ChartMaker_v1_c Welcome to the Chart Maker, vl --<<== Number of Performances of Broadway Musicals ==>>-- Chart width is: 60 Max value is: 6,836 performances One 1*1 represents 114 performances ******** (1,019) Damn Yankees, 1955 ******** ***********. ·★★★★★★★★★★★ (3,242) Fiddler on the Roof, 1964 ★★★★★★★★★★★★★★★★★★★★★★★★★★*☆ ************* (1,521) Dreamgirls, 1981 ****** (765) Into the Woods, 1987 ★★★★★★★★★★★★★★★★★★★★★ ★★★★★★★★★★★★★★★★★★★★★★★ (5,461) Beauty and the Beast, 1994 ************************************************************ (6,836) Wicked, 2003 ********* (1,066) Spider-Man: Turn Off the Dark, 2011 ********************* (2,506) Aladdin, 2014 ★★★★★★★★★★★★**** (1,919) Hamilton, 2015 *********** (1,363) Dear Evan Hansen, 2016 ***** (6,137) A Chorus Line, 1975 Thanks for using the Chart Maker, v1 codio@extra-mister:~/workspace $
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education