-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
39 lines (34 loc) · 1.2 KB
/
Main.java
File metadata and controls
39 lines (34 loc) · 1.2 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
package code._4_student_effort;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
public class Main {
/* public static void main(String[] args) {
// Get the maze instance
Maze maze = Maze.getInstance();
// Navigate through the maze
maze.navigate();
// Create the obstacle factory
ObstacleFactory obstacleFactory = new ObstacleFactory();
// Create and avoid the first obstacle
Obstacle pit = obstacleFactory.createObstacle("PIT");
pit.avoid();
// Create and avoid the second obstacle
Obstacle wall = obstacleFactory.createObstacle("WALL");
wall.avoid();
}
}
*/
public static void main(String[] args) {
OrderFactory factory = new OrderFactory();
OrderNotifier notifier = new OrderNotifier();
KitchenStaff staff = new KitchenStaff();
// notifier.addObserver(staff);
Order foodOrder = factory.createOrder("food");
Order drinkOrder = factory.createOrder("drink");
Order dessertOrder = factory.createOrder("dessert");
notifier.addOrder(foodOrder);
notifier.addOrder(drinkOrder);
notifier.addOrder(dessertOrder);
}
}