Next write a main method that creates an array of type


Write a class called Rental that extends a class called Movie. The Rental class' constructor should store the title of a movie that is rented, an integer representing the ID of the customer that rented the movie, and an integer indicating how many days late the move is. Add a method that calculates and returns the late fees for the rental. Do NOT bother to write the getters, setters, and toString methods.

Next, write a main method that creates an array of type Rental. Obviously, this array will be filled with objects of type Rental, each of which will, of course, contain all of the information listed above. You may assume the code had been written to fill the array with this information. Write code that iterates through the array, (remember to use a for loop), and returns the total amount of late fees that are outstanding.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Next write a main method that creates an array of type
Reference No:- TGS01663130

Now Priced at $10 (50% Discount)

Recommended (98%)

Rated (4.3/5)