(Solved) : Pearl S Pancake Pad Growing Restaurant Business D Like Upgrade Existing Pen Paper System T Q34564414 . . .
Pearl’s Pancake Pad is a growing restaurant business, and they’dlike to upgrade their existing pen-and-paper system for trackingtickets to a digital point of sale system. They are asking you todesign and build that point of sale program for them.
The point of sale program must:
- Allow the waitstaff to input the table number, and the numberof diners at this table. Each table can seat up to 4 diners.
- For each diner,
- Display a menu of at least 7 common breakfast items, includingtypes of drinks and entrees, with prices displayed. The menu issmall, but the quality is high!
- Allow the waitstaff to enter the items the diner has ordered.Each diner may order as many items as they want.
- After all diners at this table have ordered, display the beforetax total and total with tax for each individual diner (sales taxis 8%). Also, display the total with tax for the whole table, andsuggested tip amounts for 10%, 15%, 20% and 25% servicequalities.
- After a table is complete, the program should restart at thebeginning, and continue until the manager selects quit. Before theprogram exits, it should report the total amount of money thatshould be in the register (ticket totals + tax for the entireday).
Design Details
Below, you are given some problem analysis and design details.You may find these helpful, and you are free to base yourimplementation on these details. Note that these details may not becomplete. Feel free to add to or make changes to any of thesedetails.
Problem Definition
- Problem Description:
Design and write a program that will allow a waitperson to takeorders for each table, and calculate and display the per-persontotal, per-table total, recommended tip amounts,and overall dailytotal.
- List of Program Inputs:
- Table number
- Number of diners at table
- Menu item ordered by a diner
- List of Program Outputs:
- Menu of food items
- Before tax total for a diner
- After tax total for a diner
- After tax total for a table of diners
- Suggested tip amounts for a table
- After tax grand total for the day
Algorithm Outline
For each table of customers
Get the table number
Get the number of diners at this table
For each diner at this table
Display menu of food items
Get items ordered by this diner
Calculate before tax total of this diner’s order
Calculate and display before and after tax totals for each dinerat this table
Calculate after tax total for this table
Calculate the suggested tip amounts for this table
Display the after tax total for this table
Display the suggested tip amounts for this table
Display the grand total (after tax) for the day
Structure Summary
- Functions: List of Functions (with name, parameters, and returnvalue description):
- Name: get_table_number
Parameters: <none>
Returns: a table number (as an int)
Description: Prompts user to enter a table number; collects andreturns the user’s input (as an int).
-
- Name: get_number_of_diners_at_table
Parameters: <none>
Returns: the number of diners at this table (as an int)
Description: Prompts user to enter the number of diners at thistable; collects and returns the user’s input (as an int).
-
- Name: get_table_order
Parameters: <none>
Returns: total for the table
Description: calls get_diner_order for each diner at this table;Computes and returns the after tax total for the whole table.
-
- Name: get_diner_order
Parameters: <none>
Returns: before tax total for diner
Description: Calls display_menu_of_food_items, and then callsget_menu_item as many times as needed to collect the items orderedby this diner while accumulating the total of the item prices;Returns the before tax total for this diner.
-
- Name: display_menu_of_food_items
Parameters: <none>
Returns: <nothing>
Description: displays the menu of available food items
-
- Name: get_menu_item
Parameters: <none>
Returns: total for the table
Description: Prompts the user to enter a food item from themenu; collects and returns the item the diner is ordering.
-
- Name: display_diners_totals
Parameters: total_diner_1, total_diner_2, total_diner_3,total_diner_4
Returns: <nothing>
Description: Displays the before and after tax totals for eachdiner at this table.
-
- Name: calculate_table_total
Parameters: total_diner_1, total_diner_2, total_diner_3,total_diner_4
Returns: after tax total for table
Description: Calculates and returns the after tax total for thetable.
-
- Name: display_table_total_info
Parameters: table_total
Returns: <nothing>
Description: Displays the after tax total for this table, anddisplays suggested tip amounts.
-
- Name: main_program
Parameters: <none>
Returns: <nothing>
Description: Repeatedly calls get_table_number,get_number_of_diners_at_table, and get_table_order until the userreports that there are no more tables for today, while accumulatingthe total sales for the day; then outputs the total sales for theday.
Call Graph – the graph below shows a visualrepresentation of which functions call which other functions basedon the structure summary above
Expert Answer
Answer to Pearl S Pancake Pad Growing Restaurant Business D Like Upgrade Existing Pen Paper System T Q34564414 . . .
OR