// Chap 7, p 319 // Rename this file as QueueA.h // See file C07P320.cpp for implementation file. // ******************************************************** // Header file QueueA.h for the ADT queue. // Array-based implementation. // ******************************************************** const int MAX_QUEUE = 50; // maximum-size-of-queue; #ifndef QTYPE typedef int queueItemType; // desired-type-of-queue-item #define QTYPE #endif #include "boolean.h" class queueClass { public: // constructors and destructor: queueClass(); queueClass(const queueClass& Q); ~queueClass(); // queue operations: boolean QueueIsEmpty(); void QueueAdd(queueItemType NewItem, boolean& Success); void QueueRemove(boolean& Success); void GetQueueFront(queueItemType& QueueFront, boolean& Success); private: queueItemType Items[MAX_QUEUE]; int Front; int Rear; int Count; }; // end class // End of header file.