-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQueue.h
39 lines (35 loc) · 874 Bytes
/
Queue.h
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
/**
* Interface for the Queue class.
* Author: DorukKantarcioglu
*/
#ifndef QUEUE_H_INCLUDED
#define QUEUE_H_INCLUDED
#include "Person.h"
typedef Person QueueItemType;
class Queue
{
public:
Queue();
Queue(const Queue&);
~Queue();
bool isEmpty() const;
bool getHead(QueueItemType&) const;
void enqueue(QueueItemType);
void dequeue();
void display() const;
void displayHead() const;
/// Application-specific functions
std::string getHeadName() const;
int getHeadCurrency() const;
int getHeadAccountNo() const;
void setHeadCurrency(bool, int);
void setHeadAccountNo(int);
private:
struct Node {
QueueItemType data;
Node* next;
};
Node* head;
Node* tail;
};
#endif // QUEUE_H_INCLUDED