Book Class
This a class that models a Book and should implement the Media interface.
- Instance variables: Declare four instance variables -- id (String), author (String), title (String), and yearPublished (int).
- Constructor: Take in four arguments for an id, author, a title, and a year published and assign these values to their associated instance variables.
- Methods: Implement the four Media interface methods by returning the proper corresponding instance variable.
The getId() method: The getId method for the Book class will look exactly identical to the getId method of the CD class explained on the last page.