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
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 - 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 - Output to console with System, out, print or System. out. print ln or System, out. printf Do not use any language features that have not been covered to this point in the course materials. Copyright 2021 Arizona stace Unienib. Thir content is profected and may not be shared iplooded sold or dathbuted in whote or part. Copying my part of these instivecions or ary part of Problem Description and Given Info Pearls 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 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 2. For each diner at the table, the system must: 1. Display a menu of at least 7 common breakfast items 2 Alow the waitstaif 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. Ater all table's orders have been processed, the program should print out the register total (total price + tax for all tabies) for the day Part 9 Design and write a public stat ic method named get Tab teorder. This method should take no arguments, and should retum a double value (the total cost of all items ordered at this table plus tax). When called, this method should first ask the user for the number of diners at this table by calling the ge tNumberofoinersAtTable method. Then the method should continue to get each diners order (by calling the getDinersorder method) - collecting the total cost of all items ordered by the diners at this table. After all the diner's orders have been taken and their total costs accumulated, this method should compute the 8% tax for the table. This method should then display pre-tax total for the table, then the tax amount for the table, and then the suggested tip amounts for this table (based on the pre-tax table total). Finally, this method should return the total cost for this table (the table cost + the tax amount). Here is an outline of this method for you to follow and fill in. Here is an outine of this method for you to follow and fill in. public atatic double getrableorder() i cloop while the number of diners ordering at this table 15 greater than zeror } cdisplay the Euggested tip anounts for this table, by calling displaysuggestedtiphmountas? Enter number of diners at thim table: 2 Another item ('yes' or 'no')? yes Enter a menu choice : 2 Another 1tem ('yes' or 'no')? yes Enter a menu choice : 4 Another item ('yes' or 'no')? no Another Item ('yes' or 'no')? yes Enter a monu choice : 7 Another item ('yes' or 'no')? no Table total : 7.25 Tax amount : 0.58 106 tipt 0.73 1S6 tip: 1.09 In the example above, the method would return the double value 7.83, because the total cost of the first diner's items (bacon and orange juice) plus the cost of the second diner's items (fust a donut) is $7.25, and with an 8% tax amount of $0.58 added to that, the table total with tax comes to $783. You may wish to write some additional code to test your method. Need Help? Additional help resources are available by clicking on the words "Need Help?" at the bottom of this page, and search for help or ask a

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