0% found this document useful (0 votes)
78 views3 pages

Burger Point Menu: Computer Assignment by Aaditya Joshi

This Java program defines a class called "burger_point" that contains a menu for a burger restaurant. The main method displays an intro and menu options to the user, taking in a character for their selection. Based on the character, it calls methods that display the prices for burgers, desserts, drinks, snacks, or any offers. The methods print out the item names and prices. The program allows the user to continuously view different sections of the menu until they select "E" to exit.

Uploaded by

Aaditya Joshi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views3 pages

Burger Point Menu: Computer Assignment by Aaditya Joshi

This Java program defines a class called "burger_point" that contains a menu for a burger restaurant. The main method displays an intro and menu options to the user, taking in a character for their selection. Based on the character, it calls methods that display the prices for burgers, desserts, drinks, snacks, or any offers. The methods print out the item names and prices. The program allows the user to continuously view different sections of the menu until they select "E" to exit.

Uploaded by

Aaditya Joshi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Burger point menu

Computer assignment by Aaditya Joshi


import java.util.Scanner;
class burger_point
{
public static void main(String args[])
{
char menu;
System.out.println("Welcome, This is the menu of a burger point");
System.out.println("1. Enter F to display burger menu");
System.out.println("2. Enter D to display desserts");
System.out.println("3. Enter J to display drinks and juices");
System.out.println("4. Enter O to display discounts and offers");
System.out.println("Enter S to display snacks and side foods");
System.out.println("Enter E to end");
Scanner scanner = new Scanner(System.in);
burger_point c= new burger_point();
while(true)
{
System.out.println("\n enter your operator:");
menu = scanner.next().charAt(0);
if(menu =='E')
{
System.out.println("Thanks for your visit");
break;
}

if(menu=='F')
{
c.burger();
}
else if(menu=='D')
{
c.Desserts();
}
else if(menu=='J')
{
c.Drinks();
}
else if(menu=='S')
{
c.Extra();
}
else if(menu=='O')
{
c.Offers();
}
else
{
System.out.println("wrong operator");
}
}
}
public void burger()
{
System.out.println("Here is the list of burgers");
System.out.println("Aloo Tikki burger Cost= ₹75");
System.out.println("Chicken burger Cost= ₹125");
System.out.println("Spicy chicken burger Cost= ₹175");
System.out.println("Veggie burger Cost= ₹100");
System.out.println("Big spicy chicken wrap Cost= ₹200");
System.out.println(" Fish burger Cost= ₹150");
System.out.println(" Sausage and Egg burger Cost= ₹130");
System.out.println(" Kebab burger Cost= ₹145");
System.out.println(" Supreme Chese burger Cost= ₹175");
System.out.println(" Paneer burger Cost= ₹165");
System.out.println(" Masala burger Cost= ₹40");
}
public void Desserts()
{
System.out.println("Pastry(All Flavours) Cost= ₹45");
System.out.println("Chocolate Muffin Cost= ₹25");
System.out.println("Oreo Shake Cost= ₹30");
System.out.println("Choco Lava Cost= ₹70");
System.out.println("Choco Fudge Cost= ₹100");
}
public void Drinks()
{
System.out.println("Coca Cola Cost= ₹40");
System.out.println("Fanta Cost= ₹40");
System.out.println(" Sprite Cost= ₹40");
System.out.println(" Limca Cost= ₹40");
System.out.println(" Pepsi Cost= ₹40");
System.out.println(" Cold coffee Cost= ₹120");
System.out.println("Dalguna Coffee Cost= ₹150");
System.out.println(" Cappuccino Cost= ₹75");
}
public void Extra()
{
System.out.println("French Fries(Stack of 3) Cost= ₹70");
System.out.println(" Spring Rolls(Single Plate) Cost= ₹55");
System.out.println("Momos(Single Plate) Cost= ₹60");
System.out.println("Hakka Noodles Cost= ₹40");
System.out.println("Chips Cost= ₹15");
}
public void Offers()
{
System.out.println("Tuesday-From 11:00 Am to 1:00 Pm (30% off on your favourite burgers
and snacks)");
System.out.println(" Saturday- From 3:00 Pm to 5:00 Pm (Buy 2 burgers and get 1 free");
System.out.println(" Sunday- Entire Day (Buy a Burger and get french fries and coke free)" );
}
}

You might also like