-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathumpleCodes.java
104 lines (80 loc) · 2.8 KB
/
umpleCodes.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
class TrafficLight
{
status {
modes{
normalTraffic()->northAndSouthGreen;
lowlTraffic()->northAndSouthGreen;
highTraffic()->northAndSouthGreen;
moderateTraffic()->moderateNorthGreenLeftArrow;
}
northAndSouthGreen {
entry / { trafficLightManager.northGreen(); }
entry / { trafficLightManager.southGreen(); }
entry / { trafficLightManager.westRed(); }
entry / { trafficLightManager.eastRed(); }
timerGreen() -> northAndSouthYellow;
}
northAndSouthYellow {
entry / { trafficLightManager.northYellow(); }
entry / { trafficLightManager.southYellow(); }
entry / { trafficLightManager.westRed(); }
entry / { trafficLightManager.eastRed(); }
}
northAndSouthRed {
entry / { trafficLightManager.northRed(); }
entry / { trafficLightManager.southRed(); }
entry / { trafficLightManager.westGreen(); }
entry / { trafficLightManager.eastGreen(); }
timerGreen() -> westAndEastYellow;
}
westAndEastYellow{
entry / { trafficLightManager.northRed(); }
entry / { trafficLightManager.southRed(); }
entry / { trafficLightManager.westYellow(); }
entry / { trafficLightManager.eastYellow(); }
timerYellow() -> northAndSouthGreen;
}
moderateNorthGreenLeftArrow{
entry/{ trafficLightManager.northGreenAndArrow(); }
entry/{trafficLightManager.westRed();}
entry/{trafficLightManager.eastRed();}
entry/{ trafficLightManager.southRed(); }
timerGreen()->moderateNorthYellow;
}
moderateNorthYellow{
entry/{ trafficLightManager.northYellow(); }
entry/{ trafficLightManager.westRed(); }
entry/{ trafficLightManager.eastRed(); }
entry/{ trafficLightManager.southRed(); }
timerYellow()->moderateSouthGreenLeftArrow;
}
moderateSouthGreenLeftArrow{
entry/{ trafficLightManager.northRed(); }
entry/{ trafficLightManager.westRed(); }
entry/{ trafficLightManager.eastRed(); }
entry/{ trafficLightManager.southGreenAndArrow(); }
timerGreen->moderateSouthYellow;
}
moderateSouthYellow{
entry / { trafficLightManager.northRed(); }
entry / { trafficLightManager.southYellow(); }
entry / { trafficLightManager.westRed(); }
entry / { trafficLightManager.eastRed(); }
timerYellow->westAndEastGreen;
}
westAndEastGreen{
entry / { trafficLightManager.northRed(); }
entry / { trafficLightManager.southRed(); }
entry / { trafficLightManager.westGreen(); }
entry / { trafficLightManager.eastGreen(); }
timerGreen-> moderateNorthAndSouthRed;
}
moderateNorthAndSouthRed{
entry / { trafficLightManager.northRed(); }
entry / { trafficLightManager.southRed(); }
entry / { trafficLightManager.westYellow(); }
entry / { trafficLightManager.eastYellow(); }
timerYellow-> moderateNorthGreenLeftArrow;
}
}
}