-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVendingMachineSimulation.java
More file actions
45 lines (42 loc) · 962 Bytes
/
VendingMachineSimulation.java
File metadata and controls
45 lines (42 loc) · 962 Bytes
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
import java.io.IOException;
import javafx.application.Application;
/* Made by:
*
* Darragh Kelly - 17235545
* Pawel Ostach - 17214211
* Eoghan Russell - 17202124
* Damian Skrzypek - 17217679
*
*/
/**
This program simulates a vending machine.
*/
public class VendingMachineSimulation
{
/*
* This creates the menu for the vending machine
* @param args This passes the argument for which menu to choose
*/
public static void main(String[] args) throws IOException
{
if(args.length == 1)
{
if(args[0].equals("2"))
{
Application.launch(GUIMenu.class);
}
else if(args[0].equals("1"))
{
VendingMachine machine = new VendingMachine();
VendingMachineMenu menu = new VendingMachineMenu();
menu.run(machine);
}
else
System.out.println("USAGE: java VendingMachineSimulation 1(CMD) or 2(GUI)");
}
else
{
System.out.println("USAGE: java VendingMachineSimulation 1(CMD) or 2(GUI)");
}
}
}