//tranmain.cpp

#include "Borrower/coitem.h"
#include "Borrower/checkout.h"
#include "Media/book.h"
#include "Media/medcopy.h"
#include "Common/log.h"

int error=0;

int main()	{
   Book *book1 = new Book("Peter Coad","Object Models",
	"Building Object Models with Patterns", 505);
   MediaCopy *copy = book1->addCopy();

   CheckOut checkOut;
   if (checkOut.howManyOut() != 0) LOGERROR;

   CheckOutItem item1;
   item1.checkOut(copy);
   checkOut.add(&item1);

   if (checkOut.howManyOut() != 1) LOGERROR;
   if (checkOut.anyOverdue() != 0) LOGERROR;

   return error;
}
//end of file

