// baseballMasterList.cc
// a list of BaseballMaster_C records
// P. Conrad for CISC220, 06J


#include "baseballMasterList.h"
#include "baseballMaster.h"

#include <cassert> // for assert();
// destructor
BaseballMasterList_C:: ~BaseballMasterList_C()
{
  assert (false /* not implemented yet */);
}
  
// copy constructor 

BaseballMasterList_C::BaseballMasterList_C(const BaseballMasterList_C &orig)
{
  assert (false /* not implemented yet */);
}

// operator =

BaseballMasterList_C &  BaseballMasterList_C::operator=
(const BaseballMasterList_C & right)
{
  assert (false /* not implemented yet */);
  return (*this); // to make the stub compile
}

void BaseballMasterList_C::add(const BaseballMaster_C &a)
{
  Node_S *p = new Node_S;
  p->data = new BaseballMaster_C (a); // copy constructor
  p->next = NULL;

  if (head == NULL)
    {
      assert(tail==NULL);
      head = tail = p;
    }
  else
    {
      assert(tail != NULL);
      assert(tail->next == NULL);

      tail -> next = p;
      tail = p;
    }

}

void BaseballMasterList_C::print(std::ostream &out) const
{
  assert(false /* not implemented yet */);
}


std::ostream & operator << (std::ostream & left, 
			    const BaseballMasterList_C & right)
{
  right.print(left);
  return left;
}







