#ifndef PRIORITYQUEUE_H_ #define PRIORITYQUEUE_H_ template class entry{ public: K key; V value; //constructor entry() = default; entry(K k, V v) : key(k), value(v) {} //overload operator bool operator==(entry const e) { return key == e.key; } bool operator!=(entry const e) { return key != e.key; } bool operator>(entry const e) { return key > e.key; } bool operator<(entry const e) { return key < e.key; } bool operator>=(entry const e) { return (key > e.key) || (key == e.key); } }; template class PriorityQueue{ virtual int size() = 0; virtual bool empty() = 0; virtual entry getMax() = 0; virtual entry delMax() = 0; virtual void insert(K key, V value) = 0; //duplicate keys are allowed virtual void insert(entry e) = 0; }; #endif