-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
21 lines (17 loc) · 738 Bytes
/
Copy pathMain.java
File metadata and controls
21 lines (17 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
Booking.displayAvailableSpots(); // Display available spots and times
System.out.println("Enter the parking spot ID from the list above:");
String spotId = scanner.nextLine();
System.out.println("Enter the time you want to reserve:");
String time = scanner.nextLine();
if (Booking.reserveParkingSpot(spotId, time)) {
System.out.println("Parking reserved successfully!");
} else {
System.out.println("Failed to reserve parking. Please try again.");
}
scanner.close();
}
}