-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHotelMenu.java
More file actions
47 lines (37 loc) · 1.41 KB
/
HotelMenu.java
File metadata and controls
47 lines (37 loc) · 1.41 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
import java.util.Scanner;
public class HotelMenu{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int price,qty,choice;
System.out.println("1 for Gujarati Dish.Price : 90rs.");
System.out.println("2 for Marathi Dish.Price : 100rs.");
System.out.println("3 for Chinese Dish.Price : 100rs.");
System.out.println("4 for SouthIndian Dish.Price : 110rs.");
System.out.println("Enter your Dish number : ");
choice = sc.nextInt();
switch(choice)
{
case 1 : System.out.println("You select Gujarati Dish! How many Quantity do you need:");
qty = sc.nextInt();
price = qty * 90;
System.out.println("Total amount: "+price);
break;
case 2 : System.out.println("You select Marathi Dish! How many Quantity do you need:");
qty = sc.nextInt();
price = qty * 100;
System.out.println("Total amount: "+price);
break;
case 3 : System.out.println("You select Chinese Dish! How many Quantity do you need:");
qty = sc.nextInt();
price = qty * 100;
System.out.println("Total amount: "+price);
break;
case 4 : System.out.println("You select South Indian Dish! How many Quantity do you need:");
qty = sc.nextInt();
price = qty * 110;
System.out.println("Total amount: "+price);
break;
default: System.out.println("Wrong number!please select given number in the menu...");
}
}
}