Produce a Java program that does the following: Media hierarchy: Create Media, EBook, MovieDVD, and MusicCD
Question:
Produce a Java program that does the following:
Media hierarchy:
· Create Media, EBook, MovieDVD, and MusicCD
· Add an attribute to Media class to store indication when media object is rented versus available. Add code to the constructor and create get and set methods as appropriate.
· Add any additional constructors and methods needed to support the below functionality
Utilize a Manager class that does the following:
· stores a list of Media objects
· has functionality to load Media objects from files
· creates/updates Media files
· has functionality to add new Media object to its Media list
· has functionality to find all media objects for a specific title and returns that list
· has functionality to rent Media based on id (updates rental status on media, updates file, returns rental fee)
Implement MediaRentalSystem which has the following functionality:
· user interface which is either menu driven through console commands or GUI buttons or menus. Look at the bottom of this project file for sample look and feel.
· selection to load Media files from a given directory (user supplies directory)
· selection to find a media object for a specific title value (user supplies title and should display to user the media information once it finds it - should find all media with that title)
· selection to rent a media object based on its id value (user supplies id and should display rental fee value to the user)
· selection to exit program
The Program should throw and catch Java built-in and user-defined exceptions as appropriate
Classes must be coded with correct encapsulation: private/protected attributes, get methods, and set methods and value validation
There should be appropriate polymorphism: overloading, overriding methods, and dynamic binding
Program should take advantage of the inheritance properties as appropriate
Modern Database Management
ISBN: 978-0133544619
12th edition
Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi