feat: add L3 inputs
This commit is contained in:
parent
a300c1f0b5
commit
681c5de6cf
4
inputs/Lab3.1.in
Executable file
4
inputs/Lab3.1.in
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
3 1 0 2
|
||||||
|
1.0 1.0
|
||||||
|
3.0 1.0
|
||||||
|
5.0 1.0
|
6
inputs/Lab3.10.in
Executable file
6
inputs/Lab3.10.in
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
5 2 0 2
|
||||||
|
1.0 1.5
|
||||||
|
1.2 1.0
|
||||||
|
1.4 1.0
|
||||||
|
1.6 1.0
|
||||||
|
2.1 1.0
|
6
inputs/Lab3.11.in
Executable file
6
inputs/Lab3.11.in
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
5 1 2 0
|
||||||
|
1.0 1.0
|
||||||
|
1.1 1.0
|
||||||
|
1.2 1.0
|
||||||
|
1.3 1.0
|
||||||
|
1.4 1.0
|
12
inputs/Lab3.12.in
Executable file
12
inputs/Lab3.12.in
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
11 3 3 0
|
||||||
|
1.0 2
|
||||||
|
1.1 1
|
||||||
|
1.2 1
|
||||||
|
1.3 1
|
||||||
|
1.4 1
|
||||||
|
1.5 2
|
||||||
|
1.6 2
|
||||||
|
1.7 2
|
||||||
|
1.8 2
|
||||||
|
1.9 2
|
||||||
|
2.15 1
|
12
inputs/Lab3.13.in
Executable file
12
inputs/Lab3.13.in
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
11 3 3 0
|
||||||
|
1.0 2
|
||||||
|
1.1 1
|
||||||
|
1.2 1
|
||||||
|
1.3 1
|
||||||
|
1.4 1
|
||||||
|
1.5 2
|
||||||
|
1.6 2
|
||||||
|
1.7 2
|
||||||
|
1.8 2
|
||||||
|
1.9 2
|
||||||
|
2.25 1
|
13
inputs/Lab3.14.in
Executable file
13
inputs/Lab3.14.in
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
12 3 2 2
|
||||||
|
1.0 2
|
||||||
|
1.1 2
|
||||||
|
1.2 2
|
||||||
|
1.3 2
|
||||||
|
1.4 2
|
||||||
|
1.5 2
|
||||||
|
1.6 2
|
||||||
|
1.7 2
|
||||||
|
1.8 2
|
||||||
|
1.9 2
|
||||||
|
2.0 2
|
||||||
|
2.1 2
|
13
inputs/Lab3.15.in
Executable file
13
inputs/Lab3.15.in
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
12 3 2 3
|
||||||
|
1.0 2
|
||||||
|
1.1 3
|
||||||
|
1.2 2
|
||||||
|
1.3 3
|
||||||
|
1.4 2
|
||||||
|
1.5 3
|
||||||
|
1.6 2
|
||||||
|
1.7 3
|
||||||
|
1.8 2
|
||||||
|
1.9 3
|
||||||
|
2.0 2
|
||||||
|
2.1 3
|
4
inputs/Lab3.2.in
Executable file
4
inputs/Lab3.2.in
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
3 1 0 2
|
||||||
|
1.1 2.0
|
||||||
|
2.2 2.0
|
||||||
|
3.3 2.0
|
7
inputs/Lab3.3.in
Executable file
7
inputs/Lab3.3.in
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
6 1 0 2
|
||||||
|
1.1 2
|
||||||
|
1.2 2
|
||||||
|
1.3 2
|
||||||
|
1.4 2
|
||||||
|
4.0 2
|
||||||
|
5.0 2
|
7
inputs/Lab3.4.in
Executable file
7
inputs/Lab3.4.in
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
6 1 0 3
|
||||||
|
1.1 2
|
||||||
|
1.2 2
|
||||||
|
1.3 2
|
||||||
|
1.4 2
|
||||||
|
4.0 2
|
||||||
|
5.0 2
|
5
inputs/Lab3.5.in
Executable file
5
inputs/Lab3.5.in
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
4 2 0 1
|
||||||
|
1.0 1.0
|
||||||
|
1.1 1.0
|
||||||
|
2.2 1.0
|
||||||
|
2.3 1.0
|
5
inputs/Lab3.6.in
Executable file
5
inputs/Lab3.6.in
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
4 2 0 2
|
||||||
|
1.0 1.0
|
||||||
|
1.1 1.0
|
||||||
|
2.2 1.0
|
||||||
|
2.3 1.0
|
4
inputs/Lab3.7.in
Executable file
4
inputs/Lab3.7.in
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
3 2 0 1
|
||||||
|
1.0 4
|
||||||
|
2.1 1
|
||||||
|
4.2 1
|
6
inputs/Lab3.8.in
Executable file
6
inputs/Lab3.8.in
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
5 2 0 1
|
||||||
|
1.0 1.0
|
||||||
|
1.2 1.0
|
||||||
|
1.4 1.0
|
||||||
|
1.6 1.0
|
||||||
|
2.1 1.0
|
6
inputs/Lab3.9.in
Executable file
6
inputs/Lab3.9.in
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
5 2 0 2
|
||||||
|
1.0 1.0
|
||||||
|
1.2 1.0
|
||||||
|
1.4 1.0
|
||||||
|
1.6 1.0
|
||||||
|
2.1 1.0
|
55
outputs/ArrayTest.out
Executable file
55
outputs/ArrayTest.out
Executable file
@ -0,0 +1,55 @@
|
|||||||
|
jshell> /open Array.java
|
||||||
|
jshell> Integer i
|
||||||
|
jshell> String s
|
||||||
|
jshell> Array<Integer> a;
|
||||||
|
jshell> a = new Array<Integer>(4);
|
||||||
|
jshell> a.set(0, 3);
|
||||||
|
jshell> a.set(1, 6);
|
||||||
|
jshell> a.set(2, 4);
|
||||||
|
jshell> a.set(3, 1);
|
||||||
|
jshell> a.set(0, "huat");
|
||||||
|
| Error:
|
||||||
|
| incompatible types: java.lang.String cannot be converted to java.lang.Integer
|
||||||
|
| a.set(0, "huat");
|
||||||
|
| ^----^
|
||||||
|
jshell> i = a.get(0)
|
||||||
|
jshell> i
|
||||||
|
i ==> 3
|
||||||
|
jshell> i = a.get(1)
|
||||||
|
jshell> i
|
||||||
|
i ==> 6
|
||||||
|
jshell> i = a.get(2)
|
||||||
|
jshell> i
|
||||||
|
i ==> 4
|
||||||
|
jshell> i = a.get(3)
|
||||||
|
jshell> i
|
||||||
|
i ==> 1
|
||||||
|
jshell> s = a.get(0)
|
||||||
|
| Error:
|
||||||
|
| incompatible types: java.lang.Integer cannot be converted to java.lang.String
|
||||||
|
| s = a.get(0)
|
||||||
|
| ^------^
|
||||||
|
jshell> i = a.min()
|
||||||
|
jshell> i
|
||||||
|
i ==> 1
|
||||||
|
jshell> a.set(3,9);
|
||||||
|
jshell> i = a.min()
|
||||||
|
jshell> i
|
||||||
|
i ==> 3
|
||||||
|
jshell> // try something not comparable
|
||||||
|
jshell> class A {}
|
||||||
|
jshell> Array<A> a;
|
||||||
|
| Error:
|
||||||
|
| type argument A is not within bounds of type-variable T
|
||||||
|
| Array<A> a;
|
||||||
|
| ^
|
||||||
|
jshell> class A implements Comparable<Long> { public int compareTo(Long i) { return 0; } }
|
||||||
|
jshell> Array<A> a;
|
||||||
|
| Error:
|
||||||
|
| type argument A is not within bounds of type-variable T
|
||||||
|
| Array<A> a;
|
||||||
|
| ^
|
||||||
|
jshell> // try something comparable
|
||||||
|
jshell> class A implements Comparable<A> { public int compareTo(A a) { return 0; } }
|
||||||
|
jshell> Array<A> a;
|
||||||
|
jshell>
|
12
outputs/Lab3.1.out
Executable file
12
outputs/Lab3.1.out
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
1.000: C0 arrived [ ]
|
||||||
|
1.000: C0 service begin (by S0 [ ])
|
||||||
|
2.000: C0 service done (by S0 [ ])
|
||||||
|
2.000: C0 departed
|
||||||
|
3.000: C1 arrived [ ]
|
||||||
|
3.000: C1 service begin (by S0 [ ])
|
||||||
|
4.000: C1 service done (by S0 [ ])
|
||||||
|
4.000: C1 departed
|
||||||
|
5.000: C2 arrived [ ]
|
||||||
|
5.000: C2 service begin (by S0 [ ])
|
||||||
|
6.000: C2 service done (by S0 [ ])
|
||||||
|
6.000: C2 departed
|
20
outputs/Lab3.10.out
Executable file
20
outputs/Lab3.10.out
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
1.000: C0 arrived [ ]
|
||||||
|
1.000: C0 service begin (by S0 [ ])
|
||||||
|
1.200: C1 arrived [ ]
|
||||||
|
1.200: C1 service begin (by S1 [ ])
|
||||||
|
1.400: C2 arrived [ ]
|
||||||
|
1.400: C2 joined shop queue [ ]
|
||||||
|
1.600: C3 arrived [ C2 ]
|
||||||
|
1.600: C3 joined shop queue [ C2 ]
|
||||||
|
2.100: C4 arrived [ C2 C3 ]
|
||||||
|
2.100: C4 departed
|
||||||
|
2.200: C1 service done (by S1 [ ])
|
||||||
|
2.200: C1 departed
|
||||||
|
2.200: C2 service begin (by S1 [ ])
|
||||||
|
2.500: C0 service done (by S0 [ ])
|
||||||
|
2.500: C0 departed
|
||||||
|
2.500: C3 service begin (by S0 [ ])
|
||||||
|
3.200: C2 service done (by S1 [ ])
|
||||||
|
3.200: C2 departed
|
||||||
|
3.500: C3 service done (by S0 [ ])
|
||||||
|
3.500: C3 departed
|
18
outputs/Lab3.11.out
Executable file
18
outputs/Lab3.11.out
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
1.000: C0 arrived [ ]
|
||||||
|
1.000: C0 service begin (by S0 [ ])
|
||||||
|
1.100: C1 arrived [ ]
|
||||||
|
1.100: C1 joined counter queue (at S0 [ ])
|
||||||
|
1.200: C2 arrived [ ]
|
||||||
|
1.200: C2 joined counter queue (at S0 [ C1 ])
|
||||||
|
1.300: C3 arrived [ ]
|
||||||
|
1.300: C3 departed
|
||||||
|
1.400: C4 arrived [ ]
|
||||||
|
1.400: C4 departed
|
||||||
|
2.000: C0 service done (by S0 [ C1 C2 ])
|
||||||
|
2.000: C0 departed
|
||||||
|
2.000: C1 service begin (by S0 [ C2 ])
|
||||||
|
3.000: C1 service done (by S0 [ C2 ])
|
||||||
|
3.000: C1 departed
|
||||||
|
3.000: C2 service begin (by S0 [ ])
|
||||||
|
4.000: C2 service done (by S0 [ ])
|
||||||
|
4.000: C2 departed
|
52
outputs/Lab3.12.out
Executable file
52
outputs/Lab3.12.out
Executable file
@ -0,0 +1,52 @@
|
|||||||
|
1.000: C0 arrived [ ]
|
||||||
|
1.000: C0 service begin (by S0 [ ])
|
||||||
|
1.100: C1 arrived [ ]
|
||||||
|
1.100: C1 service begin (by S1 [ ])
|
||||||
|
1.200: C2 arrived [ ]
|
||||||
|
1.200: C2 service begin (by S2 [ ])
|
||||||
|
1.300: C3 arrived [ ]
|
||||||
|
1.300: C3 joined counter queue (at S0 [ ])
|
||||||
|
1.400: C4 arrived [ ]
|
||||||
|
1.400: C4 joined counter queue (at S1 [ ])
|
||||||
|
1.500: C5 arrived [ ]
|
||||||
|
1.500: C5 joined counter queue (at S2 [ ])
|
||||||
|
1.600: C6 arrived [ ]
|
||||||
|
1.600: C6 joined counter queue (at S0 [ C3 ])
|
||||||
|
1.700: C7 arrived [ ]
|
||||||
|
1.700: C7 joined counter queue (at S1 [ C4 ])
|
||||||
|
1.800: C8 arrived [ ]
|
||||||
|
1.800: C8 joined counter queue (at S2 [ C5 ])
|
||||||
|
1.900: C9 arrived [ ]
|
||||||
|
1.900: C9 joined counter queue (at S0 [ C3 C6 ])
|
||||||
|
2.100: C1 service done (by S1 [ C4 C7 ])
|
||||||
|
2.100: C1 departed
|
||||||
|
2.100: C4 service begin (by S1 [ C7 ])
|
||||||
|
2.150: C10 arrived [ ]
|
||||||
|
2.150: C10 joined counter queue (at S1 [ C7 ])
|
||||||
|
2.200: C2 service done (by S2 [ C5 C8 ])
|
||||||
|
2.200: C2 departed
|
||||||
|
2.200: C5 service begin (by S2 [ C8 ])
|
||||||
|
3.000: C0 service done (by S0 [ C3 C6 C9 ])
|
||||||
|
3.000: C0 departed
|
||||||
|
3.000: C3 service begin (by S0 [ C6 C9 ])
|
||||||
|
3.100: C4 service done (by S1 [ C7 C10 ])
|
||||||
|
3.100: C4 departed
|
||||||
|
3.100: C7 service begin (by S1 [ C10 ])
|
||||||
|
4.000: C3 service done (by S0 [ C6 C9 ])
|
||||||
|
4.000: C3 departed
|
||||||
|
4.000: C6 service begin (by S0 [ C9 ])
|
||||||
|
4.200: C5 service done (by S2 [ C8 ])
|
||||||
|
4.200: C5 departed
|
||||||
|
4.200: C8 service begin (by S2 [ ])
|
||||||
|
5.100: C7 service done (by S1 [ C10 ])
|
||||||
|
5.100: C7 departed
|
||||||
|
5.100: C10 service begin (by S1 [ ])
|
||||||
|
6.000: C6 service done (by S0 [ C9 ])
|
||||||
|
6.000: C6 departed
|
||||||
|
6.000: C9 service begin (by S0 [ ])
|
||||||
|
6.100: C10 service done (by S1 [ ])
|
||||||
|
6.100: C10 departed
|
||||||
|
6.200: C8 service done (by S2 [ ])
|
||||||
|
6.200: C8 departed
|
||||||
|
8.000: C9 service done (by S0 [ ])
|
||||||
|
8.000: C9 departed
|
52
outputs/Lab3.13.out
Executable file
52
outputs/Lab3.13.out
Executable file
@ -0,0 +1,52 @@
|
|||||||
|
1.000: C0 arrived [ ]
|
||||||
|
1.000: C0 service begin (by S0 [ ])
|
||||||
|
1.100: C1 arrived [ ]
|
||||||
|
1.100: C1 service begin (by S1 [ ])
|
||||||
|
1.200: C2 arrived [ ]
|
||||||
|
1.200: C2 service begin (by S2 [ ])
|
||||||
|
1.300: C3 arrived [ ]
|
||||||
|
1.300: C3 joined counter queue (at S0 [ ])
|
||||||
|
1.400: C4 arrived [ ]
|
||||||
|
1.400: C4 joined counter queue (at S1 [ ])
|
||||||
|
1.500: C5 arrived [ ]
|
||||||
|
1.500: C5 joined counter queue (at S2 [ ])
|
||||||
|
1.600: C6 arrived [ ]
|
||||||
|
1.600: C6 joined counter queue (at S0 [ C3 ])
|
||||||
|
1.700: C7 arrived [ ]
|
||||||
|
1.700: C7 joined counter queue (at S1 [ C4 ])
|
||||||
|
1.800: C8 arrived [ ]
|
||||||
|
1.800: C8 joined counter queue (at S2 [ C5 ])
|
||||||
|
1.900: C9 arrived [ ]
|
||||||
|
1.900: C9 joined counter queue (at S0 [ C3 C6 ])
|
||||||
|
2.100: C1 service done (by S1 [ C4 C7 ])
|
||||||
|
2.100: C1 departed
|
||||||
|
2.100: C4 service begin (by S1 [ C7 ])
|
||||||
|
2.200: C2 service done (by S2 [ C5 C8 ])
|
||||||
|
2.200: C2 departed
|
||||||
|
2.200: C5 service begin (by S2 [ C8 ])
|
||||||
|
2.250: C10 arrived [ ]
|
||||||
|
2.250: C10 joined counter queue (at S1 [ C7 ])
|
||||||
|
3.000: C0 service done (by S0 [ C3 C6 C9 ])
|
||||||
|
3.000: C0 departed
|
||||||
|
3.000: C3 service begin (by S0 [ C6 C9 ])
|
||||||
|
3.100: C4 service done (by S1 [ C7 C10 ])
|
||||||
|
3.100: C4 departed
|
||||||
|
3.100: C7 service begin (by S1 [ C10 ])
|
||||||
|
4.000: C3 service done (by S0 [ C6 C9 ])
|
||||||
|
4.000: C3 departed
|
||||||
|
4.000: C6 service begin (by S0 [ C9 ])
|
||||||
|
4.200: C5 service done (by S2 [ C8 ])
|
||||||
|
4.200: C5 departed
|
||||||
|
4.200: C8 service begin (by S2 [ ])
|
||||||
|
5.100: C7 service done (by S1 [ C10 ])
|
||||||
|
5.100: C7 departed
|
||||||
|
5.100: C10 service begin (by S1 [ ])
|
||||||
|
6.000: C6 service done (by S0 [ C9 ])
|
||||||
|
6.000: C6 departed
|
||||||
|
6.000: C9 service begin (by S0 [ ])
|
||||||
|
6.100: C10 service done (by S1 [ ])
|
||||||
|
6.100: C10 departed
|
||||||
|
6.200: C8 service done (by S2 [ ])
|
||||||
|
6.200: C8 departed
|
||||||
|
8.000: C9 service done (by S0 [ ])
|
||||||
|
8.000: C9 departed
|
56
outputs/Lab3.14.out
Executable file
56
outputs/Lab3.14.out
Executable file
@ -0,0 +1,56 @@
|
|||||||
|
1.000: C0 arrived [ ]
|
||||||
|
1.000: C0 service begin (by S0 [ ])
|
||||||
|
1.100: C1 arrived [ ]
|
||||||
|
1.100: C1 service begin (by S1 [ ])
|
||||||
|
1.200: C2 arrived [ ]
|
||||||
|
1.200: C2 service begin (by S2 [ ])
|
||||||
|
1.300: C3 arrived [ ]
|
||||||
|
1.300: C3 joined counter queue (at S0 [ ])
|
||||||
|
1.400: C4 arrived [ ]
|
||||||
|
1.400: C4 joined counter queue (at S1 [ ])
|
||||||
|
1.500: C5 arrived [ ]
|
||||||
|
1.500: C5 joined counter queue (at S2 [ ])
|
||||||
|
1.600: C6 arrived [ ]
|
||||||
|
1.600: C6 joined counter queue (at S0 [ C3 ])
|
||||||
|
1.700: C7 arrived [ ]
|
||||||
|
1.700: C7 joined counter queue (at S1 [ C4 ])
|
||||||
|
1.800: C8 arrived [ ]
|
||||||
|
1.800: C8 joined counter queue (at S2 [ C5 ])
|
||||||
|
1.900: C9 arrived [ ]
|
||||||
|
1.900: C9 joined shop queue [ ]
|
||||||
|
2.000: C10 arrived [ C9 ]
|
||||||
|
2.000: C10 joined shop queue [ C9 ]
|
||||||
|
2.100: C11 arrived [ C9 C10 ]
|
||||||
|
2.100: C11 departed
|
||||||
|
3.000: C0 service done (by S0 [ C3 C6 ])
|
||||||
|
3.000: C0 departed
|
||||||
|
3.000: C9 joined counter queue (at S0 [ C6 ])
|
||||||
|
3.000: C3 service begin (by S0 [ C6 C9 ])
|
||||||
|
3.100: C1 service done (by S1 [ C4 C7 ])
|
||||||
|
3.100: C1 departed
|
||||||
|
3.100: C10 joined counter queue (at S1 [ C7 ])
|
||||||
|
3.100: C4 service begin (by S1 [ C7 C10 ])
|
||||||
|
3.200: C2 service done (by S2 [ C5 C8 ])
|
||||||
|
3.200: C2 departed
|
||||||
|
3.200: C5 service begin (by S2 [ C8 ])
|
||||||
|
5.000: C3 service done (by S0 [ C6 C9 ])
|
||||||
|
5.000: C3 departed
|
||||||
|
5.000: C6 service begin (by S0 [ C9 ])
|
||||||
|
5.100: C4 service done (by S1 [ C7 C10 ])
|
||||||
|
5.100: C4 departed
|
||||||
|
5.100: C7 service begin (by S1 [ C10 ])
|
||||||
|
5.200: C5 service done (by S2 [ C8 ])
|
||||||
|
5.200: C5 departed
|
||||||
|
5.200: C8 service begin (by S2 [ ])
|
||||||
|
7.000: C6 service done (by S0 [ C9 ])
|
||||||
|
7.000: C6 departed
|
||||||
|
7.000: C9 service begin (by S0 [ ])
|
||||||
|
7.100: C7 service done (by S1 [ C10 ])
|
||||||
|
7.100: C7 departed
|
||||||
|
7.100: C10 service begin (by S1 [ ])
|
||||||
|
7.200: C8 service done (by S2 [ ])
|
||||||
|
7.200: C8 departed
|
||||||
|
9.000: C9 service done (by S0 [ ])
|
||||||
|
9.000: C9 departed
|
||||||
|
9.100: C10 service done (by S1 [ ])
|
||||||
|
9.100: C10 departed
|
60
outputs/Lab3.15.out
Executable file
60
outputs/Lab3.15.out
Executable file
@ -0,0 +1,60 @@
|
|||||||
|
1.000: C0 arrived [ ]
|
||||||
|
1.000: C0 service begin (by S0 [ ])
|
||||||
|
1.100: C1 arrived [ ]
|
||||||
|
1.100: C1 service begin (by S1 [ ])
|
||||||
|
1.200: C2 arrived [ ]
|
||||||
|
1.200: C2 service begin (by S2 [ ])
|
||||||
|
1.300: C3 arrived [ ]
|
||||||
|
1.300: C3 joined counter queue (at S0 [ ])
|
||||||
|
1.400: C4 arrived [ ]
|
||||||
|
1.400: C4 joined counter queue (at S1 [ ])
|
||||||
|
1.500: C5 arrived [ ]
|
||||||
|
1.500: C5 joined counter queue (at S2 [ ])
|
||||||
|
1.600: C6 arrived [ ]
|
||||||
|
1.600: C6 joined counter queue (at S0 [ C3 ])
|
||||||
|
1.700: C7 arrived [ ]
|
||||||
|
1.700: C7 joined counter queue (at S1 [ C4 ])
|
||||||
|
1.800: C8 arrived [ ]
|
||||||
|
1.800: C8 joined counter queue (at S2 [ C5 ])
|
||||||
|
1.900: C9 arrived [ ]
|
||||||
|
1.900: C9 joined shop queue [ ]
|
||||||
|
2.000: C10 arrived [ C9 ]
|
||||||
|
2.000: C10 joined shop queue [ C9 ]
|
||||||
|
2.100: C11 arrived [ C9 C10 ]
|
||||||
|
2.100: C11 joined shop queue [ C9 C10 ]
|
||||||
|
3.000: C0 service done (by S0 [ C3 C6 ])
|
||||||
|
3.000: C0 departed
|
||||||
|
3.000: C9 joined counter queue (at S0 [ C6 ])
|
||||||
|
3.000: C3 service begin (by S0 [ C6 C9 ])
|
||||||
|
3.200: C2 service done (by S2 [ C5 C8 ])
|
||||||
|
3.200: C2 departed
|
||||||
|
3.200: C10 joined counter queue (at S2 [ C8 ])
|
||||||
|
3.200: C5 service begin (by S2 [ C8 C10 ])
|
||||||
|
4.100: C1 service done (by S1 [ C4 C7 ])
|
||||||
|
4.100: C1 departed
|
||||||
|
4.100: C11 joined counter queue (at S1 [ C7 ])
|
||||||
|
4.100: C4 service begin (by S1 [ C7 C11 ])
|
||||||
|
6.000: C3 service done (by S0 [ C6 C9 ])
|
||||||
|
6.000: C3 departed
|
||||||
|
6.000: C6 service begin (by S0 [ C9 ])
|
||||||
|
6.100: C4 service done (by S1 [ C7 C11 ])
|
||||||
|
6.100: C4 departed
|
||||||
|
6.100: C7 service begin (by S1 [ C11 ])
|
||||||
|
6.200: C5 service done (by S2 [ C8 C10 ])
|
||||||
|
6.200: C5 departed
|
||||||
|
6.200: C8 service begin (by S2 [ C10 ])
|
||||||
|
8.000: C6 service done (by S0 [ C9 ])
|
||||||
|
8.000: C6 departed
|
||||||
|
8.000: C9 service begin (by S0 [ ])
|
||||||
|
8.200: C8 service done (by S2 [ C10 ])
|
||||||
|
8.200: C8 departed
|
||||||
|
8.200: C10 service begin (by S2 [ ])
|
||||||
|
9.100: C7 service done (by S1 [ C11 ])
|
||||||
|
9.100: C7 departed
|
||||||
|
9.100: C11 service begin (by S1 [ ])
|
||||||
|
10.200: C10 service done (by S2 [ ])
|
||||||
|
10.200: C10 departed
|
||||||
|
11.000: C9 service done (by S0 [ ])
|
||||||
|
11.000: C9 departed
|
||||||
|
12.100: C11 service done (by S1 [ ])
|
||||||
|
12.100: C11 departed
|
14
outputs/Lab3.2.out
Executable file
14
outputs/Lab3.2.out
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
1.100: C0 arrived [ ]
|
||||||
|
1.100: C0 service begin (by S0 [ ])
|
||||||
|
2.200: C1 arrived [ ]
|
||||||
|
2.200: C1 joined shop queue [ ]
|
||||||
|
3.100: C0 service done (by S0 [ ])
|
||||||
|
3.100: C0 departed
|
||||||
|
3.100: C1 service begin (by S0 [ ])
|
||||||
|
3.300: C2 arrived [ ]
|
||||||
|
3.300: C2 joined shop queue [ ]
|
||||||
|
5.100: C1 service done (by S0 [ ])
|
||||||
|
5.100: C1 departed
|
||||||
|
5.100: C2 service begin (by S0 [ ])
|
||||||
|
7.100: C2 service done (by S0 [ ])
|
||||||
|
7.100: C2 departed
|
23
outputs/Lab3.3.out
Executable file
23
outputs/Lab3.3.out
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
1.100: C0 arrived [ ]
|
||||||
|
1.100: C0 service begin (by S0 [ ])
|
||||||
|
1.200: C1 arrived [ ]
|
||||||
|
1.200: C1 joined shop queue [ ]
|
||||||
|
1.300: C2 arrived [ C1 ]
|
||||||
|
1.300: C2 joined shop queue [ C1 ]
|
||||||
|
1.400: C3 arrived [ C1 C2 ]
|
||||||
|
1.400: C3 departed
|
||||||
|
3.100: C0 service done (by S0 [ ])
|
||||||
|
3.100: C0 departed
|
||||||
|
3.100: C1 service begin (by S0 [ ])
|
||||||
|
4.000: C4 arrived [ C2 ]
|
||||||
|
4.000: C4 joined shop queue [ C2 ]
|
||||||
|
5.000: C5 arrived [ C2 C4 ]
|
||||||
|
5.000: C5 departed
|
||||||
|
5.100: C1 service done (by S0 [ ])
|
||||||
|
5.100: C1 departed
|
||||||
|
5.100: C2 service begin (by S0 [ ])
|
||||||
|
7.100: C2 service done (by S0 [ ])
|
||||||
|
7.100: C2 departed
|
||||||
|
7.100: C4 service begin (by S0 [ ])
|
||||||
|
9.100: C4 service done (by S0 [ ])
|
||||||
|
9.100: C4 departed
|
26
outputs/Lab3.4.out
Executable file
26
outputs/Lab3.4.out
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
1.100: C0 arrived [ ]
|
||||||
|
1.100: C0 service begin (by S0 [ ])
|
||||||
|
1.200: C1 arrived [ ]
|
||||||
|
1.200: C1 joined shop queue [ ]
|
||||||
|
1.300: C2 arrived [ C1 ]
|
||||||
|
1.300: C2 joined shop queue [ C1 ]
|
||||||
|
1.400: C3 arrived [ C1 C2 ]
|
||||||
|
1.400: C3 joined shop queue [ C1 C2 ]
|
||||||
|
3.100: C0 service done (by S0 [ ])
|
||||||
|
3.100: C0 departed
|
||||||
|
3.100: C1 service begin (by S0 [ ])
|
||||||
|
4.000: C4 arrived [ C2 C3 ]
|
||||||
|
4.000: C4 joined shop queue [ C2 C3 ]
|
||||||
|
5.000: C5 arrived [ C2 C3 C4 ]
|
||||||
|
5.000: C5 departed
|
||||||
|
5.100: C1 service done (by S0 [ ])
|
||||||
|
5.100: C1 departed
|
||||||
|
5.100: C2 service begin (by S0 [ ])
|
||||||
|
7.100: C2 service done (by S0 [ ])
|
||||||
|
7.100: C2 departed
|
||||||
|
7.100: C3 service begin (by S0 [ ])
|
||||||
|
9.100: C3 service done (by S0 [ ])
|
||||||
|
9.100: C3 departed
|
||||||
|
9.100: C4 service begin (by S0 [ ])
|
||||||
|
11.100: C4 service done (by S0 [ ])
|
||||||
|
11.100: C4 departed
|
16
outputs/Lab3.5.out
Executable file
16
outputs/Lab3.5.out
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
1.000: C0 arrived [ ]
|
||||||
|
1.000: C0 service begin (by S0 [ ])
|
||||||
|
1.100: C1 arrived [ ]
|
||||||
|
1.100: C1 service begin (by S1 [ ])
|
||||||
|
2.000: C0 service done (by S0 [ ])
|
||||||
|
2.000: C0 departed
|
||||||
|
2.100: C1 service done (by S1 [ ])
|
||||||
|
2.100: C1 departed
|
||||||
|
2.200: C2 arrived [ ]
|
||||||
|
2.200: C2 service begin (by S0 [ ])
|
||||||
|
2.300: C3 arrived [ ]
|
||||||
|
2.300: C3 service begin (by S1 [ ])
|
||||||
|
3.200: C2 service done (by S0 [ ])
|
||||||
|
3.200: C2 departed
|
||||||
|
3.300: C3 service done (by S1 [ ])
|
||||||
|
3.300: C3 departed
|
16
outputs/Lab3.6.out
Executable file
16
outputs/Lab3.6.out
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
1.000: C0 arrived [ ]
|
||||||
|
1.000: C0 service begin (by S0 [ ])
|
||||||
|
1.100: C1 arrived [ ]
|
||||||
|
1.100: C1 service begin (by S1 [ ])
|
||||||
|
2.000: C0 service done (by S0 [ ])
|
||||||
|
2.000: C0 departed
|
||||||
|
2.100: C1 service done (by S1 [ ])
|
||||||
|
2.100: C1 departed
|
||||||
|
2.200: C2 arrived [ ]
|
||||||
|
2.200: C2 service begin (by S0 [ ])
|
||||||
|
2.300: C3 arrived [ ]
|
||||||
|
2.300: C3 service begin (by S1 [ ])
|
||||||
|
3.200: C2 service done (by S0 [ ])
|
||||||
|
3.200: C2 departed
|
||||||
|
3.300: C3 service done (by S1 [ ])
|
||||||
|
3.300: C3 departed
|
12
outputs/Lab3.7.out
Executable file
12
outputs/Lab3.7.out
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
1.000: C0 arrived [ ]
|
||||||
|
1.000: C0 service begin (by S0 [ ])
|
||||||
|
2.100: C1 arrived [ ]
|
||||||
|
2.100: C1 service begin (by S1 [ ])
|
||||||
|
3.100: C1 service done (by S1 [ ])
|
||||||
|
3.100: C1 departed
|
||||||
|
4.200: C2 arrived [ ]
|
||||||
|
4.200: C2 service begin (by S1 [ ])
|
||||||
|
5.000: C0 service done (by S0 [ ])
|
||||||
|
5.000: C0 departed
|
||||||
|
5.200: C2 service done (by S1 [ ])
|
||||||
|
5.200: C2 departed
|
20
outputs/Lab3.8.out
Executable file
20
outputs/Lab3.8.out
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
1.000: C0 arrived [ ]
|
||||||
|
1.000: C0 service begin (by S0 [ ])
|
||||||
|
1.200: C1 arrived [ ]
|
||||||
|
1.200: C1 service begin (by S1 [ ])
|
||||||
|
1.400: C2 arrived [ ]
|
||||||
|
1.400: C2 joined shop queue [ ]
|
||||||
|
1.600: C3 arrived [ C2 ]
|
||||||
|
1.600: C3 departed
|
||||||
|
2.000: C0 service done (by S0 [ ])
|
||||||
|
2.000: C0 departed
|
||||||
|
2.000: C2 service begin (by S0 [ ])
|
||||||
|
2.100: C4 arrived [ ]
|
||||||
|
2.100: C4 joined shop queue [ ]
|
||||||
|
2.200: C1 service done (by S1 [ ])
|
||||||
|
2.200: C1 departed
|
||||||
|
2.200: C4 service begin (by S1 [ ])
|
||||||
|
3.000: C2 service done (by S0 [ ])
|
||||||
|
3.000: C2 departed
|
||||||
|
3.200: C4 service done (by S1 [ ])
|
||||||
|
3.200: C4 departed
|
23
outputs/Lab3.9.out
Executable file
23
outputs/Lab3.9.out
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
1.000: C0 arrived [ ]
|
||||||
|
1.000: C0 service begin (by S0 [ ])
|
||||||
|
1.200: C1 arrived [ ]
|
||||||
|
1.200: C1 service begin (by S1 [ ])
|
||||||
|
1.400: C2 arrived [ ]
|
||||||
|
1.400: C2 joined shop queue [ ]
|
||||||
|
1.600: C3 arrived [ C2 ]
|
||||||
|
1.600: C3 joined shop queue [ C2 ]
|
||||||
|
2.000: C0 service done (by S0 [ ])
|
||||||
|
2.000: C0 departed
|
||||||
|
2.000: C2 service begin (by S0 [ ])
|
||||||
|
2.100: C4 arrived [ C3 ]
|
||||||
|
2.100: C4 joined shop queue [ C3 ]
|
||||||
|
2.200: C1 service done (by S1 [ ])
|
||||||
|
2.200: C1 departed
|
||||||
|
2.200: C3 service begin (by S1 [ ])
|
||||||
|
3.000: C2 service done (by S0 [ ])
|
||||||
|
3.000: C2 departed
|
||||||
|
3.000: C4 service begin (by S0 [ ])
|
||||||
|
3.200: C3 service done (by S1 [ ])
|
||||||
|
3.200: C3 departed
|
||||||
|
4.000: C4 service done (by S0 [ ])
|
||||||
|
4.000: C4 departed
|
34
outputs/QueueTest.out
Executable file
34
outputs/QueueTest.out
Executable file
@ -0,0 +1,34 @@
|
|||||||
|
jshell> /open Queue.java
|
||||||
|
jshell> Integer i;
|
||||||
|
jshell> String s;
|
||||||
|
jshell> boolean b;
|
||||||
|
jshell> Queue<Integer> q = new Queue<Integer>(2);
|
||||||
|
jshell> b = q.enq(4);
|
||||||
|
jshell> b
|
||||||
|
b ==> true
|
||||||
|
jshell> b = q.enq(8);
|
||||||
|
jshell> b
|
||||||
|
b ==> true
|
||||||
|
jshell> b = q.enq(0);
|
||||||
|
jshell> b
|
||||||
|
b ==> false
|
||||||
|
jshell> s = q.deq();
|
||||||
|
| Error:
|
||||||
|
| incompatible types: java.lang.Integer cannot be converted to java.lang.String
|
||||||
|
| s = q.deq();
|
||||||
|
| ^-----^
|
||||||
|
jshell> i = q.deq();
|
||||||
|
jshell> i
|
||||||
|
i ==> 4
|
||||||
|
jshell> i = q.deq();
|
||||||
|
jshell> i
|
||||||
|
i ==> 8
|
||||||
|
jshell> i = q.deq();
|
||||||
|
jshell> i
|
||||||
|
i ==> null
|
||||||
|
jshell> q.enq("hello");
|
||||||
|
| Error:
|
||||||
|
| incompatible types: java.lang.String cannot be converted to java.lang.Integer
|
||||||
|
| q.enq("hello");
|
||||||
|
| ^-----^
|
||||||
|
jshell>
|
Loading…
Reference in New Issue
Block a user