Question: Problem1. Create a class named Movie that can be used with your video rental business. The Movie class should track the ID number, movie
Problem1. Create a class named Movie that can be used with your video rental business. The Movie class should track the ID number, movie title and year of release and appropriate getters and setters for these fields. 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 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. Here are the fees: action movies: $3/day comedies: $2.50/day dramas: $2/day Test your classes from a main method (create a Driver class with main)
Step by Step Solution
3.45 Rating (158 Votes )
There are 3 Steps involved in it
Here is the implementation of the Movie class along with its derived classes Action Comedy and Drama class Movie private int id private String title p... View full answer
Get step-by-step solutions from verified subject matter experts
