#include #include "PriorityQueue.h" #include "MultiMap.h" #include "BinaryTree.h" #include "Sandwich.h" using namespace std; void testPriorityQueue(); void testMultiMap(); void testBinaryTree(); int main() { testPriorityQueue(); testMultiMap(); testBinaryTree(); return 0; } void testPriorityQueue() { string str0 = "Hello0"; string str1 = "Hello1"; string str2 = "Hello2"; string str3 = "Hello3"; PriorityQueue strqueue; strqueue.AddItem(str0, 1); strqueue.AddItem(str1, 2); strqueue.AddItem(str2, 2); strqueue.AddItem(str3, 3); strqueue.DisplayQueue(); strqueue.RemoveItem(); strqueue.RemoveItem(); strqueue.DisplayQueue(); strqueue.AddItem(str1,2); strqueue.DisplayQueue(); strqueue.AddItem(str2,2); strqueue.DisplayQueue(); } void testMultiMap() { string str0 = "Hello0"; string str1 = "Hello1"; string str2 = "Hello2"; string str3 = "Hello3"; cout << "You can \"Put\" a single anything..." < myMultiMap; myMultiMap.Put(0, str0); myMultiMap.Put(1, str1); myMultiMap.Put(1, str2); myMultiMap.Put(2, str3); myMultiMap.DisplayMap(); cout << "\nor a collection of anythings..." < myStringCollection1; myStringCollection1.push_back(str0); myStringCollection1.push_back(str1); list myStringCollection2; myStringCollection2.push_back(str2); myStringCollection2.push_back(str3); MultiMap myMultiMap2; myMultiMap2.Put(1, myStringCollection1); myMultiMap2.Put(1, myStringCollection2); myMultiMap2.Put(2, myStringCollection2); myMultiMap2.DisplayMap(); cout << "\nUsing myMultiMap not myMultiMap2 now..." < T(n3); T.AddNewNode(n4); T.AddNewNode(n0); T.AddNewNode(n2); T.AddNewNode(n1); T.AddNewNode(n3); T.AddNewNode(n6); T.AddNewNode(n5); T.DisplayTree(); }