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 23:00
Suppose s, t, and w are strings that have already been created inside main. write a statement or statements, to be added to main, that will determine if the lengths of the three strings are in order by length, smallest to largest. that is, your code should determine if s is strictly shorter than t, and if t is strictly shorter than w. if these conditions hold your code should print (the boolean value) true. if not, your code should print false. (strictly means: no ties) example: if s, t, and w are "cat", "hats", and "skies" your code should print true - their lengths are 3-4-5; but if s, t, and w are "cats" "shirt", and "trust", then print false - their lengths are 4-5-5 enter your code in the box below
Answers: 2
question
Computers and Technology, 23.06.2019 11:30
Auser is given read permission to a file stored on an ntfs-formatted volume. the file is then copied to a folder on the same ntfs-formatted volume where the user has been given full control permission for that folder. when the user logs on to the computer holding the file and accesses its new location via a drive letter, what is the user's effective permission to the file? a. read b. full control c. no access d. modify e. none of the above
Answers: 1
question
Computers and Technology, 23.06.2019 13:10
What is domain name system (dns)? allows dynamic ip address allocation so users do not have to have a preconfigured ip address to use the network converts ip addresses into domains, or identifying labels that use a variety of recognizable naming conventions the efficient coexistence of telephone, video, and data communication within a single network, offering convenience and flexibility not possible with separate infrastructures the integration of communication channels into a single service
Answers: 2
question
Computers and Technology, 23.06.2019 16:00
Does read theory have answers keys ?
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
Mathematics, 26.10.2021 02:00
question
Mathematics, 26.10.2021 02:00
question
Spanish, 26.10.2021 02:00
Questions on the website: 13722363