title: Trouble understanding Unsorted Lists and generic data types?
body: <p>So we learned about Unsorted Lists in my Comp Sci 2 class today - the teacher mentioned that with Unsorted Lists you can create generic data types that simulate any data - however the operations on that data are defined to be something specific.  The example the book gives is along these lines: </p>
  
  <pre><code>#include “ItemType.h”
  class UnsortedType // declares a class data type
  {
  public : 
  // 8 public member functions
       void UnsortedType ( );
       bool IsFull ( ) const; 
       int GetLength ( ) const ; // returns length of list
       ItemType GetItem ( ItemType item, bool&amp; found);
       void PutItem ( ItemType item ); 
       void DeleteItem ( ItemType item ); 
       void ResetList ( );
       ItemType GetNextItem (); 
  private :
  // 3 private data members
       int length; 
       ItemType info[MAX_ITEMS]; 
       int currentPos;
  };
  </code></pre>
  
  <p>My question is: when I try to recreate something like this, do I have to make some class specifically called ItemType? Or is ItemType a placeholder for whatever object you want to store in the Unsorted List? (for example, could you replace ItemType with say: phonebookContacts where phonebookContacts class is an object that contains contact information for people in a phonebook?)</p>