-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQueue.h
More file actions
32 lines (27 loc) · 686 Bytes
/
Queue.h
File metadata and controls
32 lines (27 loc) · 686 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
#ifndef QUEUEBANK_H
#define QUEUEBANK_H
#include <iostream>
class Queue{
public:
Queue(); //ctor
Queue(int); //ctor param
Queue (const Queue& ); //cctor
Queue& operator=(const Queue&); //operator=
~Queue(); //dtor
// operasi dasar
void Add(int); //untuk memasukkan ID saat arrival, akan masuk ke paling belakang
void Delete(); // untuk departure (hilangkan yang paling depan)
void DelBack(); //untuk jockeying (yang paling belakang dihilangkan)
//operasi lainnya
bool IsEmpty();
int GetNeff();
int GetHeadValue();
int GetTailValue();
void Print();
private:
int *T;
int N;
int HEAD;
int TAIL;
};
#endif // QUEUEBANK_H