Code /* testll.cpp CIS 250 David Klick 2009-02-23 Driver program to test linkedList class. */ #include "linkedList.h" #include #include using std::cin; using std::cout; using std::endl; using std::boolalpha; void cont(); int main() { linkedList lst; cout << "List empty: " << boolalpha << lst.isEmpty() << endl; lst.add(17); lst.addFirst(5); lst.addLast(3); lst.print(); cout << lst << endl; cout << "List empty: " << lst.isEmpty() << endl; cout << "List length: " << lst.length() << endl; cout << "First item: " << lst.front() << endl; cout << "Last item: " << lst.back() << endl; cout << "17 found: " << lst.search(17) << endl; cout << "14 found: " << lst.search(14) << endl; lst.remove(3); lst.remove(5); cout << "After 3 and 5 deleted: "; lst.print(); cout << "List length: " << lst.length() << endl; cont(); return 0; } void cont() { if (cin.rdbuf()->sungetc() != -1 && cin.get() != '\n') cin.ignore(80,'\n'); cout << "Press enter to continue..."; cin.get(); }