CME255E – DESCRIPTION (Solution)

$ 20.99
Category:

Description

The goal is to create a library called Netflix, 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 Person, User, Category, Material, Book, Movie, Netflix. 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 Person.
id:int
firstName:string, lastName:string, age:int
——————————————————————————-
Define a class named User and inherite it from the Person class.
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 Material.
id:int
name:string scores: contains multiple int values release_year: int category: Category
price: int type:string; //”movie” or “book”; Material(id,name,scores, release_year,price,category,type); void addScore(score:int); // add a new score to scores double getAvgScore(); //getting avarage score of this material object showDetail();
——————————————————————————-
Define a class named Book and inherite it from the Material class.
writer : Person numberOfPages : int

Book(id,name,scores, release_year,price,category,type,writer,numberOfPages); setWriter(newWriter:Person);
…. and the other methods which coming from Material class.
——————————————————————————-
CLASS6-Define a class named Movie and inherite it from the Material class..
actors: ArrayList (birden fazla Person sınıfından türetilmiş nesne barındırabilir) director: Person

Movie(id,name,scores, release_year,price,category,type,actors, director); void addActor(actor: Person); override showDetail();
… and the other methods which coming from Material class.
——————————————————————————-
CLASS7-Define a class named Netflix materials: ArrayList //(it must be able to contain multiple material objects.) credential: User; isLogin:boolean //initial value must be false and you don’t need to get this value from the user. Netflix(materials);
login(user:User // if credential is true you can set isLogin=true and credential=user; (For Example: userName:testUser password:123456);
addMovie(m1:Movie); addBook(b1:Book); .
addMaterial(m2:Material);

(Create 4 Methods. You do not need to do any login checks for the following steps for NETFLIX. )
N1-Create the function that displays the information of the object with the highest average score among all materials.
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 “category id” as a parameter and displays information on the most expensive material in that category of netflix.
N4-Create a function that takes a person’s id as a parameter and displays the information of all movies acted by him/her on the screen.
———————————————————————————-
In Main Method:
1-Create multiple Person 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-Create multiple Book objects and add some scores to them.
5-Create a User object.
6-Create a Netflix object.
7-Login for netflix object.
8-Add the objects you created in steps 3 and 4 to the Netflix object.
9-Finally, runnig the N1-N2-N3-N4 functions mentioned in the Netflix section, then ensure that their outputs are displayed separately.

Reviews

There are no reviews yet.

Be the first to review “CME255E – DESCRIPTION (Solution)”

Your email address will not be published. Required fields are marked *