Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java with using The purpose of this assignment is to help you learn Java identifiers, assignments, input/output, selection and flow of control statements: if, if/else.

image text in transcribedJava with using

The purpose of this assignment is to help you learn Java identifiers, assignments, input/output, selection and flow of control statements: if, if/else. For loops

Question 2 Online Order Program Bots In this question, you will write a program to help the customer order food online and calculate the total price Your program should follow the following rules: Prompt the user to enter the choice based on the menu and validates the information The choice should be an integer number displayed on menu from 1 to 6. COMP248/Winter 2021 - Assignment 2 Page 2 of 5 A price to saleulate the total penge of the voer . Please find the menu and price in the following table. You must use switch statement to create the menu options Menu 1. Hamburrer 2. Plema 3. Noodle 4. Salad 5. Sandwich 6. Exit Price without Meat Price with beef Price with por $25.5 $17.5 $7.5 $25.5 $17.5 $7.5 25 $17.5 $7.5 $25.5 $17.5 $255 $17.5 Your program should be able to ask user's new choice if the user enters Yes for more food. the total price is less than $50, the customer needs to pay $5 for delivery. . Your program should ask the amount of tips that the customer would like to pay. Display welcome/closing messages The following are sample screen shots to illustrate the expected behavior of your program. Your program must display the same information with the same format Welcome to Online Order Program! ****************************** 1. Hamburger 2. Pizza 3. Noodle 4. Salad 5. Sandwich 6. Exit Please enter your choice (1-613 Your choice is: Noodle. Would you like to have some meat on your Noodle? Yes Beef or Park? beer Would you like to have more food? The total price is less than se. You need to pay the delivery fee ss. Would you like to pay some tips? Please enter the amount: 3.5 The total price is $34.. Thank you for using Online Order Program! Figure 2. Sample output of Question2 COMP248/Winter 2021 - Assignment 2 Page 3 of 5 ette Welcome to Online Order Program! ! 1. Hamburger 2. Pizza .. Noodle 4. Salad S. Sandwich 3. Exit Please enter your choice (1-6): G Your choice is: Finish the order! No need to pay the delivery fee. The total price is so.. Thank you for using Online Order Program : Figure 3. Sample output of Question 2 ++ Welcome to online order. Pror.............+++++++ 1. Hamburger 2. Pizza 3. Noodle 4. Salad 5. Sandwich 4. Exit Please enter your choice (1-611 That is a wrong input. Please try again! Please enter your choice (1-613 Your choice is: Noodle. Would you like to have some meat on your Noodlet Yes Beef or Parkt be Would you like to have more food? Yes ? Please enter your choice (1-61: 5 Your choice is: Sandwich. Would you like to have some meat on your Sandwich? Yes Beef or Park? beef Would you like to have more food? no No need to pay the delivery fee

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

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

More Books

Students also viewed these Databases questions

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago