-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDequeDriverJJ.java
More file actions
56 lines (42 loc) · 1.29 KB
/
Copy pathDequeDriverJJ.java
File metadata and controls
56 lines (42 loc) · 1.29 KB
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 DequeDriverJJ{
public static void main(String []args){
QQKachoo<String> test1 = new QQKachoo<String>();
test1.addFirst("cat");
test1.addLast("cat");
test1.addFirst("dog");
test1.addLast("dog");
test1.addFirst("elephant");
test1.addLast("elephant");
test1.addFirst("child");
test1.addLast("child");
test1.addFirst("flag");
test1.addLast("flag");
test1.addFirst("pear");
test1.addLast("pear");
test1.addFirst("F");
test1.addLast("E");
System.out.println(test1);
System.out.println(test1.backString());
System.out.println("my turn");
QQKachoo<String> itestf = new QQKachoo<String>();
itestf.addLast("hi");
itestf.removeFirst();
itestf.addFirst("hello");
itestf.removeLast();
//-----normal functionality test
System.out.println(itestf.removeFirst());
System.out.println(itestf.removeLast());
itestf.addFirst("second");
System.out.println(itestf);
System.out.println(itestf.backString());
itestf.addFirst("first");
System.out.println(itestf);
System.out.println(itestf.backString());
itestf.addLast("achoo");
System.out.println(itestf);
itestf.removeLast();
itestf.addLast("third maybe last");
System.out.println(itestf);
System.out.println(itestf.backString());
}
}