Question: In assignment 2 , you made a library management system that was used to manage the library's collection of books. However, the library would now

In assignment 2, you made a library management system that was used to manage the library's collection of books. However, the library would now like to upgrade its system to allow for other media items, like movies and music albums, to exist inside of the library and be available for checkout!
Your task is to create a class, MediaItem, to act as a base class for all media items in the library that encapsulates the fields and behaviors that are general to all media item types and to create two new classes, DVD and VinylRecord, that inherit from MediaItem alongside Book.
The MediaItem class:
Should encapsulate the title and availability fields
Should have a constructor that initializes all fields
Should have the appropriate accessor methods for all fields
Should have mutators concerned solely with updating a MediaItem's availability: CheckoutMediaItem() and ReturnMediaItem()
Should not have a mutator for title, title should be set upon creation only using the constructor.
Should have a virtual void method named DisplayInfo that has no parameters and prints out the title and the availability to the consoleIt should be in the following format: "Title: , Availability: ."
The DVD class:
Should encapsulate the director and release year fields (both strings)
The VinylRecord class:
Should encapsulate the artist (string) and number of tracks(int) fields
The Book class (to be modified from the assignment 2 implementation):
Should now encapsulate only the author and ISBN fields
The DVD, VinylRecord and Book classes should:
Inherit from MediaItem
Have a constructor that initializes all fields, now with proper delegation to the base class's constructor for fields of the base class
Have appropriate accessor methods for all fields exclusive to their respective classes
Not have mutators for their exclusive fields. These fields should be set upon creation only using the constructor
Override the DisplayInfo method and print out information that is specific to the derived class in question.
The formats for DisplayInfo's output are as follows:
DVD: "Title:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!