-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArrayQueueType.h
More file actions
40 lines (27 loc) · 779 Bytes
/
Copy pathArrayQueueType.h
File metadata and controls
40 lines (27 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
template <class Type>
class queueType: public queueADT<Type>
{
public:
queueType (int);
bool isEmptyQueue() const;
bool isFullQueue() const;
Type front() const;
Type back() const;
void enqueue(const Type& queueElement);
void dequeue();
int queueSize();
void clear();
void print();
private:
int maxQueueSize;
//variable to store the maximum queue size
int count;
//variable to store the number of
//elements in the queue
int queueFront; //variable to point to the first
//element of the queue
int queueRear; //variable to point to the last
//element of the queue
Type *list; //pointer to the array that holds
//the queue elements
};