Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Scenario A family - run caf , serves freshly cooked hot meals, hot / cold sandwiches, daily starters and desserts, including hot / cold drinks
Scenario A familyrun caf serves freshly cooked hot meals, hotcold sandwiches, daily starters and desserts, including hotcold drinks from the menu. There are waiters serving tables for dine in and staff are allocated to tables to serve dine in customers as shown in Table Customers can order collections and takeaways, and these are allocated to Table for easy identification. All prices include VAT. Typical orders taken are as shown in Table The owner would like a computer program to manage the orders and payments effectively. Please use sample values provided in Table Table and Table Typical menu items used for orders are provided in Table Requirements: You are being asked to create a working Java programme in stages Design Code and Test to meet the following requirements: The programme should have the following three options as part of the menu. a Place order. b Display invoice. c Exit The menu should be displayed after each option is executed to enable suitable user choice looped menu a Only valid entry choice for Exit should end the program. The programme should take user input from keyboard for the choices and data entry. Validate user inputs to avoid errors. The programme should employ only fixed arrays where necessary dynamic arrays ie ArrayList, vector, HashMap, etc. are not to be used. Additional suitable entries to be created for Table as indicated. The program should display the final invoice as displayed in Table The menu data does not need to be stored in the program. However, values for creating an order entry should be taken from menu items provided in Table
Table Table allocation. Table# Staff Kiran Sam Jill Jill Sam Jill Sam Sam Jill Table Typical items ordered. Order# Table# Item# Name Qty Price Comment Pop drink Pepsi, No ice Jacket potato with beans Lasagne with cheese Mac&cheese Choc brownie Tea pot empty cups Coffee White, no sugar Bacon Egg Cheese Veg burger Pop drink Lemonade Steak Ale pie Egg Mayo baguette
Table Sample receipt for Order# Order# Table# Date: Oct Staff: Jill Item# Name Qty Price Subtotal Pop drink Pepsi no ice Bacon Egg Cheese sandwich Veg Burger Total VAT Net amount
Table Typical menu items Menu Soup of the day Sweet corn w chicken Cream of TomatoMushroom Veg soup Baked Potato w filling Baked Beans Cheese Tuna Coleslaw Toasties Cheese Ham & Cheese Bacon Egg Cheese Sausage Egg cheese Baguette Ham&Brie Grilled Chicken Mayo Prawn salad Egg May Tuna sweetcorn Burger Chicken Hamburger Veggie Main Courses Steak & Ale Pie Fish & chips Breaded Scampi w fries Chicken pasta Lasagne veg Spaghetti Bolognese Hotdog w fries Kids Menu Chicken nuggets Macaroni Cheese Pigs in a blanket Sides French fries S L Onion rings S L Garlic bread Nachos cheeseguacsalsa Desserts Chocolate cookie brownie Cheesecake VanilaLemon Pie AppleCherry Pancakes Drinks Tea cup pot Coffee Cappuccino Hot Chocolate Pop FantaPepsiColaLemonade Sparkling Water
Include additional corresponding entries to Table with appropriate values from Table and using the information in the scenario to complete the following tasks. Task Provide an algorithm flowchart pseudocode for the programme to meet the following requirements. Provide elaboration and explain how you have addressed logical errors, validated user input, while justifying the structures you have used. Requirements for algorithm: Should demonstrate all the scenario requirements. Should be legible, modular, and use standard conventions and format. Should test and validate user input. Should make use of sample data provided in tables and additional entries. LOs: Task Create java code for the algorithm you have created in Task Provide the different methods and include the packages you will need to import. Comment the code suitably to elaborate the algorithm. Elaborate the methods for any parameters andor any values being returned. Requirements for the code: Should be provided in text so it can be verified. Should include comm
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started