Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are required to develop a restaurant management system in the Java programming language: Your project should fulfill the following requirements: Prompt user to enter

You are required to develop a restaurant management system in the Java programming language:

Your project should fulfill the following requirements:

Prompt user to enter an input: an interactive program

Use selection statement

Use repetition statement

Use method

Use array to keep information

Has view function (to view the content of array).

Has at least two (2) additional functions or more (add, update, delete or search the content of array).

Has menu and submenu (navigation)

Include calculations in your system.

Include comments to make your code understandable to the readers.

Can Anyone help me to do this in simple java language?

I have tried to do this code but i m not good at it. You can change the restaurant name and the items in there as long there is something about restaurant management. Plaese give me the code in this format. I m very a beginner.

import java.util.Scanner; public class ProgProject{ static Scanner read = new Scanner(System.in); //main method public static void main(String[]args){ //declaration and initialization int select; char exit='\0'; do{ //display main menu System.out.println(); System.out.println("Welcome to The Burgers"); System.out.println("-----------------MENU-----------------"); System.out.println("| 1. About us |"); System.out.println("| 2. Food Menu |"); System.out.println("| 3. Add Food Order |"); System.out.println("| 4. Daily records |"); System.out.println("| 5. Search |"); System.out.println("| 0. EXIT |"); System.out.println("--------------------------------------"); //ask user to input System.out.print("Enter your choice (1-5) or 0 to Exit: "); select = read.nextInt(); switch(select){ case 1 : showAboutUs();break;//method call showAboutUs() case 2 : showFoodMenu();break;//method call showFoodMenu() case 3 : showFoodOrder();break;//method call showFoodOrder() case 4 : showDailyRecords();break;//method call showDailyRecords() case 5 : showSearch();break;//method call showSearch() case 0 : System.out.print(" Do you want to exit(Y/N)?: ");//exit exit = read.next().charAt(0);break; default: System.out.println("Invalid choice.(1-5) or 0 ONLY!!");break;//invalid choice }//end switch if(exit=='Y'||exit=='y'){ System.out.println(" --Thank you. Have a nice day.--");}//end if }while(select!=0||exit=='n'||exit=='N');//end do while }//end main

//method showAboutUs() public static void showAboutUs() { //display About Us System.out.println(); System.out.println(" ABOUT US"); System.out.println("--------------------------------------------------------------------------"); System.out.println("Welcome to The Burgers. Here we provide service of food ordering" + "\and satisfy your carvings." + " We exist to connect local Malaysians to each other through great tasting bowl burger+ " while also supporting local farmers and utilizing the freshest ingredients." ); System.out.println("------------------------------------------------- -------------------------"); }//end method showAboutUs()

//method showFoodMenu() ...... }//end method showFoodMenu()

//method showAddFoodOrder() public static void showBeautyTips() { //declaration and initialization

public class Menu { public double subTotal; public static double runningTotal; private static double itemPrice; static boolean ordering = true; static Scanner input = new Scanner(System.in);

public static void menu() { System.out.println("Welcome 1. Burger ($2.00) 2. Fries ($1.50) 3. Soda ($1.00) 4. Done"); }

public static double itemPrice(int foodItem) { if (foodItem == 1) { // burger= $2.00 System.out.println("You've ordered a burger"); itemPrice = 2.00; } if (foodItem == 2) { // fries = $1.50 System.out.println("You've ordered fries"); itemPrice = 1.50; } if (foodItem == 3) { // soda = $1.00 System.out.println("You've ordered a soda"); itemPrice = 1.00; } quantity(); return itemPrice; }

public static double quantity() { System.out.println("Enter quantity"); double quantity = input.nextDouble(); subTotal(quantity, itemPrice); return quantity; }

public static double subTotal(double quantity, double itemPrice) { double subTotal = quantity * itemPrice; System.out.println("Subtotal: " + subTotal); return subTotal; }

public static void done(double runningTotal) { ordering = false; System.out.println(runningTotal); System.out.println("Enjoy your meal"); }

public static void main(String[] args) { int menuOption; int foodItem = 0; input = new Scanner(System.in); do { double runningTotal = 0; menu(); menuOption = input.nextInt(); switch (menuOption) { case 1: foodItem = 1; itemPrice(foodItem); break; case 2: foodItem = 2; itemPrice(foodItem); break; case 3: foodItem = 3; itemPrice(foodItem); break; case 4: done(runningTotal); break; default: System.out.println("Invalid option."); } } while (ordering); { subTotal(quantity(), itemPrice(foodItem)); runningTotal = runningTotal + subTotal(quantity(), itemPrice(foodItem)); } } }}//end method showAddFoodOrder()

//method showDaIilyrecords() public static void showDaillyrecords() { //declaration and initialization Scanner sc = new Scanner(System.in); System.out.println("<<<<<< WELCOME TO the burgers SYSTEM>>>>>>"); System.out.println("============================================="); System.out.print("Enter the number of all shop items: "); int shopItems = sc.nextInt(); int orderNo = 0; int items[]=new int[shopItems]; double totalPrice[]=new double[shopItems]; for(int i=0; i

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

When is it appropriate to use a root cause analysis

Answered: 1 week ago