CatalogItem Class

CatalogItem is a generic class that will take two type parameters T and S. T will represent the type of a CatalogItem's ID and will be bounded by the Comparable interface. S will represent the type of a CatalogItem's contained object and will be bounded by the Media interface that we have created. CatalogItem must also implement the Comparable interface itself so that we may sort CatalogItems.

Hence, the CatalogItem class would be declared as follows :

  public class CatalogItem<T extends Comparable<T>,S extends Media> implements Comparable<CatalogItem<T,S>>
  {
	//your code
  }