Extend above with a rental class this class should store a


Create a class named Movie that can be used with a video rental business. The Movie class should track the Motion Picture Association of America (MPAA) rating (e.g.,Rated G, PG-13, R), ID Number, and movie title with appropriate accessor and mutator methods. Also create an equals() method that overrides Object's equals method, where two movies are equal if their ID number is identical. Next, create three additional classes named Action, Comedy, and Drama that are derived from class Movie. Finally, create an overridden method named calcLateFees that takes as input the number of days a movie is late and returns the late fee for that movie. The default late fee is $2/day. Action movies have a late fee of $3/day, comedies $2.50/day, and dramas $2/day. Test above classes using a main method.

Extend above with a Rental class. This class should store a Movie that is rented, an integer representing the ID of the customer who rented the movie, and an integer indicating how many days late the movie is. Add a method that calculates the late fee for the rental. In the main method create an array of type Rental, filled with sample data of all types of movies. Then, create a method named lateFeesOwed that iterates through the array and returns the total amount of late fees that are outstanding.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Extend above with a rental class this class should store a
Reference No:- TGS01250123

Now Priced at $20 (50% Discount)

Recommended (91%)

Rated (4.3/5)