Source Code Structure
Your Project should contain the following files:
-
Media.java
: An interface with four methods. -
CD.java
: A simple class which models a CD and implements the Media interface. -
Book.java
: A simple class which models a Book and implements the Media interface. -
CatalogItem.java
: A generic class with one type parameter. There must also be a condition on this type parameter where it has to implement the interface 'Media' The CatalogItem class itself should also implement the Comparable interface. - CatalogDriver.java: Copy and paste this code or download and import the entire file into your project. This is the driver program provided to you, but it is not fully functional. Follow the comments within the file in order to complete its definition.