Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is a Lab Challenge. You must watch the video (located in the Lab Participation item in the current module in Canvas), and complete and

image text in transcribed
image text in transcribed
image text in transcribed
This is a Lab Challenge. You must watch the video (located in the Lab Participation item in the current module in Canvas), and complete and submit the code for this lab, the video includes questions that you must answer in order to receive full credit for this Lab. All the code you will need is provided and explained in the video. Required Skills Inventory - Write a method that takes no arguments and returns a value - Use System. out. print to prompt the user for input - Use a Scanner to collect user input - Call one user-defined method from another - Store the return value from a method in a variable - Use a while loop to get the computer to repeat instructions - Accumulate a total in a variable Do not use any language features that have not been covered to this point in the course materials. Problem Description and Given Info Pearl's Pancake Pad is a growing restaurant business. They would like to upgrade their existing pen-and-paper system for tracking tickets to a digital point of sale system. They are asking you to build that point of sale program for them. The point of sale program must: 1. Allow the waitstaff to input the item ordered by each diner at a given table - Each table can seat up to 4 diners 1. Allow the waitstaff to input the item ordered by each diner at a given table - - Each table can seat up to 4 diners 2. For each diner at the table, the system must: 1. Display a menu of at least 7 common breakfast items 2. Allow the waitstaff to enter the items the diner has ordered - Each diner may order as many items as they want 3. After the orders for all diners at a table have been entered, the system must display: 1. total price for the whole table (pre-tax) 2. total tax for the whole table (tax is 8% of the total price) 3. suggested tip amounts for 10%,15%,20% and 25% tips for whole table (on the pre-tax total) 4. the program should continue to ask if there are more tables, and repeat the steps described above for each table. 5. After all table's orders have been processed, the program should print out the register total (total price + tax for all tables) for the day. Part 7 Design and write a public static method named getDinersorder. This method should take no arguments, and should return a double value (the total cost of this diner's order). When called, this method should first display the menu by calling the displayMenu method. Then the method should continue to ask if this diner would like to order another menu item (by caling the dinerWant AnotherItem method) - collecting the total cost of all items ordered by this diner (use the getMenuChoice method to get this diner) - untem ordered by this diner, and call the getPriceofMenuChoice method to determine the cost of each menu item ordered by this diner) - until the diner does not want any more menu items. After the diner has finished ordering menu iteEns, this method should return the accumulated total cost of all menu items ordered by this diner as a double. Here is an outline of this method for you to follow and fill in. public statie double getDinersorder () cadd the price of the menu cholce to the total cot> 1 Calling getDinersorder( ) might result in an interaction with the user that looks like this: Another item ('yes'" or "no')? yes Enter a menu choice : 2 Another iten ('yes' or 'no')? yes Enter a menu choice : 4 Another item ('yes' or 'no')? no In the example above, the method would return the double value 5.25, because the total cost of the bacon plus the cost of the orange juice is \$5.25. You may wish to write some additional code to test your method

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_2

Step: 3

blur-text-image_3

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

Beginning C# 2005 Databases

Authors: Karli Watson

1st Edition

0470044063, 978-0470044063

More Books

Students also viewed these Databases questions

Question

What are the ethical considerations for running this group? (D10)

Answered: 1 week ago

Question

How does the concept of hegemony relate to culture?

Answered: 1 week ago