subject

Create a java program to store and process movie ratings. use a 2d array to store ratings by different reviewers for different movies. each row represents a different movie and each column represents a different reviewer. there will also be two separate arrays to store the names of movies and the names of the reviewers. you may use the attached uml diagram to base information off of and the test program code at the bottom to test it. movieratings()constructor for the classone parameter is an array of reviewers namesone parameter is an array of movie namesdescription: set the parameters equal to the private data members for the movies and reviewers; initialize the 2d ratings array based on the size of the reviewers array (rows) and the size of the movies array (columns)getavgrating()returns a double value representing the average ratingdescription: find the average rating for all movies and all reviewers (i. e. all data in the table)getavgratingsbymovie()one parameter, the index of the movie to find all the reviews forreturns a double value representing the average ratingdescription: find the average rating for a single movie (i. e. one column representing all the reviewers scores for that one movie)getavgratingsbyreviewer()one parameter, the index of the reviewer to find all the reviews forreturns a double value representing the average ratingdescription: find the average rating for a single reviewer (i. e. one row representing all the movies for that one reviewer)getmovieindex()one parameter, the name of the moviereturns an integer representing the index number of that moviedescription: searches the movies array to find the index location for that movie. this can then be used to find the ratings for that movie in the ratings 2d arraygetreviewerindex()one parameter, the name of the reviewerreturns an integer representing the index number of that reviewerdescription: searches the reviewers array to find the index location for that reviewer. this can then be used to find the ratings for that reviewer in the ratings 2d arraysetrating()one parameter each for the movie index, for the reviewer index and for the rating to storedescription: the reviewer index specifies the row, the movie index specifies the column and the rating is the value to store in that cellprintmovieratings()one parameter that represents the index of the movie name and the movie ratingsdescription: prints the movie name and the ratings to system. outexample: "the lego movie: 5, 6, 2, 7, 8"printreviewerratings()one parameter that represents the index of the reviewers name and their movie ratingsdescription: prints the reviewer name and the ratings to system. outexample: "roger ebert: 4, 2, 8, 9"test program code: public class movieratingstest{ public static void main(string args[]) { string[] movies = {"gravity", "12 years a slave", "spaceballs"}; string[] reviewers = {"jen", "bino", "sophia"}; movieratings ratings = new movieratings(reviewers, movies); //give some values for the ratings for(int i = 0; i

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:40
In a response of approximately 50 words, explain why it would be essential for the successful a/v technician to participate in additional coursework, presentations and seminars offered by equipment manufacturers as well as annual conferences attended by colleagues in the industry.
Answers: 1
question
Computers and Technology, 23.06.2019 20:40
Instruction active describing list features which statements accurately describe the features of word that are used to create lists? check all that apply. the tab key can be used to create a sublist. the enter key can be used to add an item to a list. the numbering feature allows for the use of letters in a list. the numbering feature can change the numbers to bullets in a list. the multilevel list feature provides options for different levels in a list.
Answers: 2
question
Computers and Technology, 23.06.2019 21:30
Which of the following includes the three primary network access technologies? dsl, cable modem, broadband lan, wan, man voip, uc, iptv tcp/ip, ftp, dhcp
Answers: 2
question
Computers and Technology, 24.06.2019 11:00
Under the home tab, where can a user find options to change the bullet style of an outline? in the slides group in the font group in the paragraph group in the drawing group
Answers: 1
You know the right answer?
Create a java program to store and process movie ratings. use a 2d array to store ratings by differe...
Questions
question
Chemistry, 24.10.2021 01:00
Questions on the website: 13722367