// TestSimpleList.cpp - an inadequate test program - wdg 2009 #include using namespace std; #include "SimpleList.h" int main( ) { SimpleList B(5); // calls constuctor B.add(0); B.add(3.1415); B.add(1.414); cout << B.getItem(0) << " " << B.getItem(1) << " " << B.getItem(2) << endl; SimpleList C(10); for(int i=0; i<10; i++) C.add(i); B=C; cout << B.getItem(0) << " " << B.getItem(1) << " " << B.getItem(2) << endl; cout << B.getItem(-99); // causes exception return 0; }