-
Notifications
You must be signed in to change notification settings - Fork 0
/
DSAShufflingQueue.java
56 lines (46 loc) · 1.02 KB
/
DSAShufflingQueue.java
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
public class DSAShufflingQueue extends DSAQueue {
/*DEFAULT CONSTRUCTOR
IMPORT: none // Default constructors don't import
EXPORT: none // Constructors never export
ASSERTION: Creates an object with the default values*/
public DSAShufflingQueue()
{
super();
}
/*CONSTRUCTOR with PARAMETERS
IMPORT: (integer) maxCapacity
EXPORT: NONE //Construstors never export
ASSERTION: Creates DSAStack object with imported values*/
public DSAShufflingQueue(int maxCapacity)
{
super(maxCapacity) ;
}
public int getCount()
{
return count;
}
public boolean isEmpty()
{
boolean empty = super.isEmpty();
return empty;
}
public boolean isFull()
{
boolean full = super.isFull();
return full;
}
public void enqueue(Object value) throws QueueIsFullException
{
super.enqueue(value);
}
public Object dequeue() throws QueueIsEmptyException
{
Object value = super.dequeue();
return value;
}
public Object peek() throws QueueIsEmptyException
{
Object frontVal = super.peek();
return frontVal;
}
}