-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTakingOrder_Restaurant.java
More file actions
65 lines (58 loc) · 2.75 KB
/
Copy pathTakingOrder_Restaurant.java
File metadata and controls
65 lines (58 loc) · 2.75 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
// Taking orders from Customers in a Hotel and Displaying them (Using Arrays).
import java.util.*;
import java.io.*;
class Java_Tiffins
{
public static void main(String args[])
{
Scanner in=new Scanner(System.in);
System.out.println(" Welcome to JAVA Tiffins !! ");
in.nextLine();
System.out.println("First tell me, How many people are in your group ? : ");
int customers = in.nextInt();
String Customer_Name[] = new String[customers];
for( int i = 0; i < Customer_Name.length; i++)
{
System.out.print("Enter the name of Customer : " + (i+1) + ".");
Customer_Name[i] = in.nextLine();
in.nextLine();
String[] Menu = {"No Selection", "Idly", "Dosa", "Puri", "Vada", "Chapathi", "Upma", "Pongal", "Bonda", "Masala Idiyappam", "Tea/Coffee/Milk"};
double[] Menu_Price = new double [11];
Menu_Price [0] = 0.00;
Menu_Price [1] = 20.00;
Menu_Price [2] = 40.00;
Menu_Price [3] = 30.00;
Menu_Price [4] = 25.00;
Menu_Price [5] = 30.00;
Menu_Price [6] = 25.00;
Menu_Price [7] = 30.00;
Menu_Price [8] = 30.00;
Menu_Price [9] = 60.00;
Menu_Price [10] = 10.00;
System.out.print("Please Select one item from the Menu.");
System.out.print("*********** Order Menu *********");
System.out.println();
System.out.println("1. **No Selection** is Rs.0.00");
System.out.println("2. Idly - Rs.20.00");
System.out.println("3. Dosa - Rs.40.00");
System.out.println("4. Puri - Rs.30.00");
System.out.println("5. Vada - Rs.25.00");
System.out.println("6. Chapathi/Parota - Rs.30.00");
System.out.println("7. Upma - Rs.25.00");
System.out.println("8. Pongal - Rs.30.00");
System.out.println("9. Bonda - Rs.30.00");
System.out.println("10.Masala Idiyappam - Rs.60.00");
System.out.println("11.Tea/Coffee/Milk - Rs.10.00");
System.out.println("Please enter your Selection : ");
int Selection = in.nextInt();
String[] Menu1 = new String[Selection];
in.nextLine();
System.out.println("Thank you, " + Customer_Name[i] + ". Your Order consists of : " +Selection);
in.nextLine();
}
System.out.println("Your Order will arrive soon");
in.nextLine();
System.out.println("Thank You for choosing JAVA Tiffins");
System.out.println("Hope to see you again");
}
}