Question
Using Java Programming: ( Screenshots of the output are required ) DESCRIPTION The goal is to create a library called DisneyPlus, which hosts Movies and
Using Java Programming: ( Screenshots of the output are required )
DESCRIPTION The goal is to create a library called DisneyPlus, which hosts Movies and Books, and then to be able to view information such as the best movie (based on score), the most expensive book, all the movies in which an actor has acted. The classes you need to define are Consumer, User, Category, Asset, Book, Movie, DisneyPlus. Apart from these, you do not need to define any classes. You can use any built-in method or structure that you think will work for you.
---------------------------------------------------------------------------------- QUESTION Define a class named Consumer. id:int birthYear:int, salary:int, firstName:string, lastName:string, ------------------------------------------------------------------------------- Define a class named User and inherite it from the Consumer class. loginStatus:boolean; //if user signed in set true. Default value is false userName:string; password:string; User(id,firstName,LastName,userName,password); ------------------------------------------------------------------------------- Define a class named Category. id:int, categoryCode:string; categoryName:string; Category(id,code,name); ------------------------------------------------------------------------------- Define a abstract class named Asset. id:int name:string scores: contains multiple int values release_year: int category: Category price: int type:string; //"movie" or "book"; Asset(id,name,scores, release_year,price,category,type); void addScore(score:int); // add a new score to scores double getMaxScore(); // getting max score of this Asset object double getMinScore(); // getting min score of this Asset object double getAvgScore(); //getting avarage score of this Asset object showDetail(); ------------------------------------------------------------------------------- Define a class named Book and inherite it from the Asset class. writer : Consumer numberOfPages : int Book(id,name,scores, release_year,price,category,type,writer,numberOfPages); setWriter(newWriter:Consumer); .... and the other methods which coming from Asset class. ------------------------------------------------------------------------------- CLASS6-Define a class named Movie and inherite it from the Asset class.. actors: ArrayList director: Consumer Movie(id,name,scores, release_year,price,category,type,actors, director); boolean deleteActor(consumerId:int); // if you can delete return true otherwise return false void addActor(actor: Consumer); override showDetail(); ... and the other methods which coming from Asset class. ------------------------------------------------------------------------------- CLASS7-Define a class named DisneyPlus assets: ArrayList //(it must be able to contain multiple Asset objects.) credential: User; //initially set null isLogin:boolean //initial value must be false and you don't need to get this value from the user. DisneyPlus(assets); login(user:User) //(For Example: userName:testUser password:123456); //user must be logged in to add anything otherwise show a warning message by using below 3 methods. You must check LoginStatus of user Void addMovie(m1:Movie); Bool removeMovie(movieId:int); Void addBook(b1:Book); . bool removeBook(bookId:int); Void addAsset(m2:Asset);
---------------------------------------------------------------------------------- (Create 4 Methods. You do not need to do any login checks for the following steps for DisneyPlus. ) N1- Create the function that displays the information of the OLDEST actors. N2-Create the function that displays the information of the movie with the lowest average score on the screen. N3-Create a function that takes a "movie_id" as a parameter and displays information of highest paid actor in that movie. N4-Create a function that takes a "category id" as a parameter and displays information on the most cheapest Asset in that category of DisneyPlus. N5-Create a function that takes a Consumer's id as a parameter and displays the information of all movies acted by him/her on the screen. N6- Create the function that displays the information of the object with the highest average score among all Assets.. ---------------------------------------------------------------------------------- In Main Method: 1-Create multiple Consumer objects. You will use them when defining objects such as Movie, Book. 2-Create multiple Category objects. You will use them when defining objects such as Movie, Book. 3-Create multiple Movie objects and add some scores to them. 4-Find the max, min scores for these movies. 5-Create multiple Book objects and add some scores to them. 6-Print out the avarage score of specific book by using getAvarageScore method. 7-Create a User object. 8-Create a DisneyPlus object. 9-Login for DisneyPlus object. 10-Add the objects you created in steps 3 and 5 to the DisneyPlus object. 11-Finally, runnig the N1-N2-N3-N4-N5-N6 functions mentioned in the DisneyPlus section, then ensure that their outputs are displayed separately.
Step 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