Your task is to come up with an object-oriented design for a streaming movie rental system
(like NetFlix). The names of your classes, private instance variables, methods etc. are totally
up to you.
Specication
Every user has the following information associated with them:
A name.
An account number.
An ordered playlist of movies. In particular, if movie A is before movie B in the playlist, then the user watches A before B.
The five most recent movies that the user has watched.
There are three different kinds of users:
Trial: A trial user can only have one movie in their playlist at a time.
Members: A member can have up to 5 movies in their playlist at a time.
VIP Members: A VIP member can have an unlimited number of movies in their playlist.
Every user must be able to do the following operations:
Check-out a movie. If a user checks out a movie, then it is put at the end of the user's playlist.
Watch a movie: If a user watches a movie, then the movie is removed from the user's playlist. You may assume that the user can only watch whatever movie is at the front of the playlist.
Recall the five most recent movies that they have watched: This operation should print the most recent movies that the user has watched to the screen.
Every movie contains the following information:
A title.
A date.
A genre.
A rental price.
Notice that different users have different movie rental rights, so it is possible that a user willattempt to do something that (s)he is not allowed to do. When this occurs, you must do thefollowing:
Make sure that the operation is not performed.
Print an informative error message that states why the operation could not be performed.
Your object-oriented design must include the following object-oriented features:
An abstract class. What should be the base class that other classes build o of?
Inheritance. In particular, you must inherit from a base abstract class.
Polymorphism (Dynamic Binding). In particular, your method for checking a movie out must be polymorphic.