#include #include "priqueue.h" #include "position1.h" #include "mydata1.h" // testpq3.cpp // 1.22.01 // G. Volger // To test prioroty queue class, ordered linked list class, and // mydata class with operator overloading // You must add mydata.cpp to your project int main () { PriorityQueue q; Position p(7, 7); MyData x("hello", p); // Enter the following data: // "hello", (7, 2) // "goodbye", (5, 9) // "you", (1, 1) // "say", (2, 1) // "I", (5, 9) // "hello", (7, 1) // q.Enqueue(x); // hello and (7, 2) already in x cin >> x; // Type in goodbye and (5, 9) q.Enqueue(x); cin >> x; // Type in you and (1, 1) q.Enqueue(x); cin >> x; // Type in say and (2, 1) q.Enqueue(x); cin >> x; // Type in I and (5, 9) q.Enqueue(x); cin >> x; // Type in say and (7, 1) q.Enqueue(x); // Your output should be: // you say goodbye I say hello while (!q.isEmpty()) { q.Dequeue(x); cout << x << " "; } return 0; }