#include "Queue.h"
#include "List.h"
using namespace std;

int main()
{
   List<int>      list1;
   List<char>     list2;
   List<string>   list3;
   Queue<int>     q1;
   Queue<char>    q2;
   Queue<string>  q3;

   cin >> list1 ;            // enter the integers  1, 11, 111, 1111
   cout << list1 << endl ;   // print them out using the overloaded insertion operator (<<) of the List
   cout << "first item: " << list1.takeFromFront() << endl;
   list1.addToRear(456);
   cout << list1 << endl;


   cin >> list2;             // enter the characters  qwerty
   cout << list2 << endl;    // print them out using the overloaded insertion operator (<<) of the List

   cin >> list3 ;            // enter tom dick and harry
   cout << list 3 << endl;   // print them out using the overloaded insertion operator (<<) of the List

   q1.enqueue(1);
   q1.enqueue(11);
   q1.enqueue(111);
   q1.enqueue(1111);
   q1.enqueue(q1.dequeue());
   cout << "Queue of integers: " << q1;
   
   q3.enqueue("Tom");
   q3.enqueue("Dick");
   q3.enqueue("Harry");
   q3.enqueue(q3.dequeue());
   cout << "Queue of names: " << q3 << endl;  // should be Dick, Harry and Tom   
 
   // demonstrate value semantics are preserved
   //  do overloaded assignment first
   Queue<string>  q4;
   q4 = q3;
   cout << "New queue of names: << endl;

   //   now do the copy constructor
   q4.dequeue();          // modify q4; remove Dick; Harry and Tom should still be there 
   Queue<string>  q5(q4); // create a new queue as a clone of q4
   cout << q5 << endl;    // should be Harry and Tom

}


