Question: Movie Problem (Java language) Consider a movie rental business. Create a class named Movie which can be used for your video rental business. The Movie
Movie Problem (Java language)
Consider a movie rental business. Create a class named Movie which can be used for your video rental business. The Movie class should track the following: Motion Picture Association of America Rating (e.g. Rated G, PG-13, R) ID number Movie title. Ensure appropriate getter/setter methods in your class definition. Create an equals() method (which overrides java.lang.Objects method), where two movies objects are equal if their ID number is identical.
Next, create three additional classes named Action, Comedy and Drama which are each derived from Movie. Lastly create an overridden method named calculateLateFees which takes input a number of days the movie is late and returns the late fee for that movie. The default fee is $2 a day. Action movies have a fee of $3 per day, comedies are $2.50 per day, and dramas are $2 per day.
Test your classes with a main method, either inside one of the classes or inside a class of its own.
Save your submission in Movie.java, Action.java, Comedy.java, and Drama.java.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
