Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help! Due in a couple hours Pearl's Pancake Pad Il (Java) Pearl's Pancake Pad is a growing restaurant business. They would like to upgrade

Please help! Due in a couple hours image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Pearl's Pancake Pad Il (Java) 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 design and build that point of sale program for them The point of sale program must 1. Allow the waitstaff to input the table number, and the number of diners at this table 1. 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 1. The menu is small, but the quality is high 2. Allow the waitstaff to enter the items the diner has ordered 1. Each diner may order as many items as they want 3. Display the total (before tax) and total (with tax) for each individual diner (sales tax is 8%) 3. After the orders for all diners at this table have been entered, the system must display: 1. total with tax for the whole table 2. suggested tip amounts for 10%, 15%, 20% and 25% tips for whole table 4. After a table is complete, the program should restart at the beginning, and continue until the manager selects "quit" 5. When the manager selects "quit", the program must report the total amount of money that should be in the register (ticket totals + tax for the entire day), before the program ends Part 1 - Analysis and Design Take some time to analyze the problem description above. Based on your analysis, begin to sketch a design for a program to solve the problem. Produce a document that captures your design. Your design document should include the following information You may use or adapt your design documentation from the previous Collaborative Project Challenge in which you designed and implemented this system in Python. Program Inputs ldentify each of the inputs to the program. For each input, provide the following: 1. Description of the input 2. Good name for a variable to store the input value input value 3. Data type of this input Program Outputs ldentify each of the outputs from the program For each output, provide the following: 1. Description of the output 2. Good name for a variable to store the output value 3. Data type of this output Structure Summary . Methods 1. Design a method named displayMenu, that will display the menu of numbered (1 - 7) choices when called. This method should take no arguments, and should return no value. 2. Design a method named getMenuChoice, that will ask for and collect the user's menu choice. This method should take no arguments, and should return an int value indicating the menu number of the menu item the user has selected. 3. Design a method named getPriceOfMenuChoice. This method should take an int argument indicating a menu choice (1 - 7), and should return a float value indicating the price of this menu item. 4. Design a method named dinerWantsAnotherltem, that asks the user if the diner wants another menu item. This method should take no arguments, and should return a boolean value indicating whether or not the diner wants to order another menu item. 5. Design a method named getDinersOrder. This methood should take no arguments, and should return a float value indicating the total cost (pre tax) of the items this diner orders. This method should first display the menu (by calling the displayMenu method), then continue to ask if this diner would like to order another menu item (by calling the dinerWantsAnotherltem method) collecting the total cost of all items ordered by this diner until the diner does not want any more menu items. The method should print out the total cost of this diner's order (both without and with 8% sales tax) before returning the accumulated total cost (pre tax) of all menu items ordered by this diner. 6. Design a method named getNumberOfDinersAtTable, that will ask the user how many diners are at this table (1-4), and will return an int value indicating the number of diners at this table. 7. Design a method named displaySuggestedTipAmmounts. This method should take a float argument indicating a cost, andd should return no value. This method should display a list of tip amounts for 10%, 15%, 20%, and 25% tip rates based on the cost value passed in as an argument. 8. Design a method named getTableOrder. This method should take no arguments, and should return a float value indicating the total cost (with tax) for all the diners at this table. This method should first ask the user to enter the number of diners at this table (by calling the getNumberOfDinersAtTable method). Then it should take the order for each diner at the table (by calling the getDinersOrder method) collecting the total cost for all the diners at this table. The method should print out the total cost for this table (with 8% sales tax), and a list of tip amounts for 10%, 15%, 20%, and 25% tip rates, before returning the accumulated total cost (with tax) for all the diners at this table. gs to think about when you're designing program Spend some time choosing your variable and method names carefully. Names should be descriptive. For each method your design and write, make sure that method does only one thing. For each method that you design and write, give that method a name that clearly describes what that method does. For each method that you design and write, ask yourself "What things does this method need to know in order to be able to do what this method should do?" The things the method needs to know should be passed to the method as arguments, so the method will need some parameter variables to store these argument values that are passed to it. Some methods may not need to know anything in order to do what they should do, but those that do the use of global variables within methods. 5. For each method that you design and write, ask yourself "what do l need to get back from this method?". If this method must give something back when it is called, the method should use a returrn statement to return that value. 6. Tasks that are repeated within the program should generally be inside of some loop Part 2 - Implementation Now that you have taken the time to analyze the problem and to sketch a design for a solution, it is time to begin implementing your design. Use the design that you created for Part 1 of this challenge, and implement this design in Java

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

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions

Question

e. What difficulties did they encounter?

Answered: 1 week ago