Create a class called Movie
that can be
used with your video rental business. The Movie
class should track the movie Picture Association of America (MPAA)
rating (e.g., Rated G, PG, PG-13, R), ID Number, and movie title with
appropriate accessor and mutator methods.
Also, create an equals()
method that
overrides Object
's 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 an overidden method called calcLateFees
that takes an input the number of days a movie is late and
returns a late fee for that movie. The default late fee is $2/day. Action movies
have a late fee of $3/day, comedies are $2.50/day and drama are $2/day. Test
your classes from a main
method.