Question
Write a java program to ask people's preferences on a favorite tv show and compute statistics and display the results. Rate the item from 1
Write a java program to ask people's preferences on a favorite tv show and compute statistics and display the results.
Rate the item from 1 (least preferred) to 10 (most preferred). You must use at least one enhanced for statement. Please use a separate method to compute and display the results instead of implementing all the code in the main method. The method must have at least one parameter of an array that includes the user input.
Example input and output:
Enter the number of responses: 2
Enter response 1 for Friends:3
Enter response 1 for The Voice: 4
Enter response 1 for American Idol: 7
Enter response 1 for The Office: 8
Enter response 1 for Glee: 10
Enter response 2 for Friends:1
Enter response 2 for The Voice: 5
Enter response 2 for American Idol: 9
Enter response 2 for The Office: 4
Enter response 2 for Glee: 3
You must add appropriate comments in your code as below, generate javadocs, and submit html files together with your source code.
Add class level javadoc comment with @author tag and description about the class.
Add method level javadoc comments with @param and @return (if your method returns a value) tags with the description of the method, parameters, and return value.
In the methods, please add end-of-line or block comments whenever necessary to help others understand your code
DO NOT add comments such as // end of method, // end of class. you have to explain what your application does. Please make sure the java documents you generated contains your javadoc comments properly.
Statistics of the responses Response 1 Response 2 Average Total 4 Friends The Voice American Idol 7 The Office Glee The tv show with the highest point. American Idol, The tv show with the lowest point: Friends, 4 2 4 4.5 16 12 13 4 10 6.5Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started