Computers and Technology

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

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 22:40, hePandaKing3689
State the parts of a variable declaration?
Answers: 2
image
Computers and Technology, 22.06.2019 19:30, tfaulk2884
Singing in the rain: this first part of the film shows the early history of motion picture. how accurate do you think the portrayal of the early motion picture industry is? why? is historical accuracy important in films and theater productions? explain.
Answers: 1
image
Computers and Technology, 24.06.2019 22:00, justincsh7238
Ican’t open these when it’s just a comment. someone pls explain why this is happening
Answers: 1
image
Computers and Technology, 25.06.2019 07:50, joshbee2014
Assignment: permutations use the permutation formula   r ! ! n n p nr   to solve each problem. be sure to show all work leading to your answer. part i: solve real-world permutation problems choose any four (4) of the following five problems to solve. for each problem a) show how the permutation formula can be used to find the answer and b) write a sentence to explain the meaning of the answer for the situation. 1. to register for online banking services at a local credit union, you need to select a four-digit personal identification number, or pin code. the digits cannot be repeated. how many ways are there to arrange four digits out of the numerals 0 through 9 to create a code?
Answers: 3
Do you know the correct answer?
Create a java program to store and process movie ratings. use a 2d array to store ratings by differe...

Questions in other subjects: