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, 21.06.2019 19:20
Number of megabytes of ram in a computer. qualitative or quantitative? because
Answers: 3
question
Computers and Technology, 22.06.2019 16:30
The most common battery cable terminal is a that provides a large surface contact area with the ability to tighten the terminal onto the battery post using a nut and bolt.
Answers: 2
question
Computers and Technology, 23.06.2019 00:40
Consider the following statements: struct nametype{string first; string last; }; struct coursetype{string name; int callnum; int credits; char grade; }; struct studenttype{nametype name; double gpa; coursetype course; }; studenttype student; studenttype classlist[100]; coursetype course; nametype name; mark the following statements as valid or invalid. if a statement is invalid, explain why.a.) student.course.callnum = "csc230"; b.) cin > > student.name; c.) classlist[0] = name; d.) classlist[1].gpa = 3.45; e.) name = classlist[15].name; f.) student.name = name; g.) cout < < classlist[10] < < endl; h.) for (int j = 0; j < 100; j++)classlist[j].name = name; i.) classlist.course.credits = 3; j.) course = studenttype.course;
Answers: 1
question
Computers and Technology, 23.06.2019 11:20
Http is the protocol that governs communications between web servers and web clients (i.e. browsers). part of the protocol includes a status code returned by the server to tell the browser the status of its most recent page request. some of the codes and their meanings are listed below: 200, ok (fulfilled)403, forbidden404, not found500, server errorgiven an int variable status, write a switch statement that prints out the appropriate label from the above list based on status.
Answers: 2
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
Mathematics, 07.07.2019 10:00
question
Mathematics, 07.07.2019 10:00
Questions on the website: 13722367