-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathuserController.java
More file actions
59 lines (48 loc) · 1.35 KB
/
userController.java
File metadata and controls
59 lines (48 loc) · 1.35 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
57
58
59
package garageSystem;
public class userController {
public static void main(String[] args) {
Garage garageObject = new Garage();
Screen screenObj = new Screen();
Parking parkingObj = new Parking();
Payment paymentObject = new Payment();
Exit exitObj = new Exit();
boolean x=true;
int choice=0;
while (x){
choice = screenObj.chooseOption();
while (choice >4 || choice<1){
choice = screenObj.chooseOption();
}
if (choice==1){
Vehicle vehicleObj = new Vehicle();
int park = parkingObj.parkIn(garageObject.slotArray, vehicleObj, garageObject.getConfiguration(), garageObject);
}
if (choice == 2){
exitObj.parkOut(garageObject);
}
if (choice == 3){
screenObj.displayAvailableSlots(garageObject);
}
if (choice == 4){
SignIn sign = new SignIn();
boolean X= sign.signIn(garageObject);
while (X == false ){
X= sign.signIn(garageObject);
}
int newChoice = screenObj.chooseAdminOptions();
if (newChoice == 1){
System.out.println(garageObject.getVehicleCount());
}
if (newChoice == 2){
screenObj.printTotalIncome(garageObject);
}
if (newChoice == 3){
screenObj.displayAvailableSlots(garageObject);
}
}
}
//garageObject.parkIn();
//Screen screenObject= new Screen();
//screenObject.displayAvailableSlots(garageObject);
}
}