#include #include #include #include "List.h" using namespace std ; int main() { int pos ; List Test_List ; cout << "First print before any change : " << endl ; Test_List.print() ; cout << "-------------------------------------------" << endl ; cout << "Insert At End of List : " << endl ; Test_List.InsertAtEnd() ; Test_List.print() ; cout << " ------------------------------------------" << endl ; cout << "Insert At End of List : " << endl ; Test_List.InsertAtEnd() ; Test_List.print() ; cout << " --------------------------------------" << endl ; cout << "Insert At Begin of List : " << endl ; Test_List.InsertAtBegin () ; Test_List.print() ; cout << "---------------------------------------" << endl ; cout << "Insert At begin of List : " << endl ; Test_List.InsertAtBegin () ; Test_List.print() ; cout << "---------------------------------------" << endl ; cout << "Remove from begin of List : " << endl ; Test_List.RemoveFromFirst() ; Test_List.print() ; cout << "---------------------------------------" << endl ; cout << "Remove from End of List : " << endl ; Test_List.RemoveFromLast () ; Test_List.print() ; cout << "---------------------------------------" << endl ; cout << "Enter a specific position to Insert after it: " << endl ; cin >> pos ; cout << "--------------------------------------- " << endl ; Test_List.InsertAt(pos) ; Test_List.print() ; cout << "--------------------------------------- " << endl ; cout << "Enter specific position to remove : " << endl ; cin >> pos ; cout << "--------------------------------------- " << endl ; Test_List.RemoveAt (pos) ; Test_List.print() ; cout << "--------------------------------------" << endl ; cout << "Sorted Linked List : " << endl ; Test_List.Sort() ; Test_List.print() ; system("pause") ; return 0 ; }