Food
Food
ArrayList;
import java.util.Scanner;
public class Foodtask {
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
boolean check=true;
System.out.println("_______________________________________________________________
________________");
System.out.println("| dumdham hotel(100% pure vegetarian)
|");
System.out.println("---------------------------------------------------------------
----------------");
System.out.println();
System.out.println(" welcome to our hotel
");
System.out.println();
boolean end1 = false;
while (!end1) {
System.out.println("1. Menu");
System.out.println("2. Add items");
System.out.println();
System.out.println("enter the option :");
int a = sc.nextInt();
sc.nextLine();
switch (a) {
case 1:
System.out.println(" ___________________________________
___________________________________");
System.out.println();
System.out.println(" Menu
");
System.out.println();
System.out.println(" ___________________________________
___________________________________");
System.out.println(" | soups |
| Biryani's |");
System.out.println(" -----------------------------------
-----------------------------------");
System.out.printf(" %-25s %8s %-25s %8s%n", "| Minestrone
", "-- 200/- |", "| Veg Fritters", "-- 200/- |");
System.out.printf(" %-25s %8s %-25s %8s%n", "| Minestrone
", "-- 200/- |", "| Veg Fritters", "-- 200/- |");
System.out.printf(" %-25s %8s %-25s %8s%n", "| Minestrone
", "-- 200/- |", "| Veg Fritters", "-- 200/- |");
System.out.printf(" %-25s %8s %-25s %8s%n", "| Minestrone
", "-- 200/- |", "| Veg Fritters", "-- 200/- |");
System.out.println(" ___________________________________
___________________________________");
System.out.println(" | staters |
| chinese |");
System.out.println(" -----------------------------------
-----------------------------------");
System.out.printf(" %-25s %8s %-25s %8s%n", "| Minestrone
", "-- 200/- |", "| Veg Fritters", "-- 200/- |");
System.out.printf(" %-25s %8s %-25s %8s%n", "| Minestrone
", "-- 200/- |", "| Veg Fritters", "-- 200/- |");
System.out.printf(" %-25s %8s %-25s %8s%n", "| Minestrone
", "-- 200/- |", "| Veg Fritters", "-- 200/- |");
System.out.printf(" %-25s %8s %-25s %8s%n", "| Minestrone
", "-- 200/- |", "| Veg Fritters", "-- 200/- |");
System.out.println(" -----------------------------------
-----------------------------------");
case 2:
additems();
end1=false;
break;
}
}
}
public static void additems(){
Scanner sc = new Scanner(System.in);
ArrayList<String> itemsselected = new ArrayList<String>();
ArrayList<Integer> itemsselectedcost = new ArrayList<Integer>();
String[] items = {"soups", "staters", "biriyani", "chinese","proceed to
check"};
String[] soupitems = {"Tomato soup", "Pumpkin soup", "Lentil soup",
"potato soup"};
int[] soupitemscost = {250, 200, 230, 270};
String[] statersitems = {"Cheese balls", "Kakori kebabs", "Aloo bonda",
"Paneer tikka", "Chaat"};
int[] statersitemscost = {250, 200, 230, 270, 340};
String[] biryaniitems = {"paneer biryani", "aloo biryani", "jackfruit
biryani", "kaju biryani", "corn biryani"};
int[] biryaniitemscost = {3, 4, 5, 7, 9, 2};
String[] chineseitems = {"Mapo Tofu", "Chow Mein", "Spring Rolls",
"Wonton Soup", "Char Siu"};
int[] chineseitemscost = {340, 420, 530, 720, 950, 230};
System.out.println("add items");
boolean end = false;
while (!end) {
}
System.out.println(totalcost);
System.out.println("enter your name: ");
String name=sc.nextLine();
System.out.println("enter your phone number: ");
int phonenumber=sc.nextInt();
System.out.println("enter your address: ");
String address=sc.nextLine();
System.out.println("order confirmed");
System.out.println("Thank you for visiting");
end = true;
}
}
}