-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
35 lines (25 loc) · 1.03 KB
/
Main.java
File metadata and controls
35 lines (25 loc) · 1.03 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
import java.util.Scanner;
public class Main {
static void reservation(){
System.out.println("Do you want to make a reservation [Y]es [N]o? ");
Scanner userInput = new Scanner(System.in);
String answer = userInput.nextLine();
if (answer.equals("Y")){
int numOfReservations= 0;
System.out.println("What's the first name? ");
String firstName = userInput.nextLine();
System.out.println("Whats's the last name? ");
String lastName = userInput.nextLine();
Reservations vacation = new Reservations(firstName, lastName,8, 4, 541);
System.out.println("Can't wait for you to stay with us! Reservaiton Number: " + numOfReservations);
System.out.println(vacation.roomNumber);
} else {
System.out.println("Goodbye");
}
}
public static void main(String[] args) {
int numOfReservations= 0;
reservation();
numOfReservations++;
}
}