Question: Problem 2 : Present Statistical Information Building upon the foundation of Problem 1 , extend the program to provide viewers with a further statistical breakdown

Problem 2: Present Statistical Information
Building upon the foundation of Problem 1, extend the program to provide viewers with a further
statistical breakdown of their collective ratings. Write the body of the program called Problem2
that reads viewer ratings (the same as in Problem1) and compute and print out the total number
of votes in each level of rating and its corresponding percentage value.
Input
The input format is the same as in Problem 1.
Processing
The program should count the total number of votes in each level of ratings, e.g., how many 5-
star votes. Furthermore, the percentage of votes in each corresponding rating level should be
calculated by considering the number of votes in each level of ratings divided by the total number
of votes.
Output
The program should print out five lines with vote count and percentage information for each
rating level respectively. The output has the following format:
C11-star votes, P1
C22-star votes, P2
C33-star votes, P3
C44-star votes, P4
C55-star votes, P5
where Ci and Pi (i =1,2,...,5) are vote count and percentage value respectively. Pi should be
rounded to two decimal places. in JAVA

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!