-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTicketingApp.java
More file actions
66 lines (49 loc) · 1.52 KB
/
Copy pathTicketingApp.java
File metadata and controls
66 lines (49 loc) · 1.52 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
60
61
62
63
64
65
66
import java.util.Scanner;
public class TicketingApp {
static Scanner input = new Scanner(System.in);
public static void main(String[] args) {
System.out.println("\t\t\t WELCOME TO TRENDLY EVENTS");
userDashboard();
}
public static void userDashboard() {
String userDashboard = """
1. Search event
2. View events
3. Create events
4. Book events
5. Wallet
6. Sign out
""";
System.out.println(userDashboard);
int choice = input.nextInt();
input.nextLine();
EventServices service = new EventServices();
switch (choice) {
case 1 -> {
System.out.println("Search event: ");
String search = input.nextLine();
service.searchEvent(search);
}
case 2 -> {
service.listOfEvents();
}
case 3 -> {
service.getEventDetails();
}
case 4 -> {
System.out.println("Booking ticket...");
}
case 5 -> {
System.out.println("Opening wallet...");
}
case 6 -> {
System.out.println("Signed out successfully.");
SignIn.handleSignOut();
}
default -> {
System.out.println("Invalid choice");
userDashboard();
}
}
}
}