Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

FOR PYTHON Pearl's Pancake Pad is a growing restaurant business, and they'd like to upgrade their existing pen-and-paper system for tracking tickets to a digital

FOR PYTHON

Pearl's Pancake Pad is a growing restaurant business, and they'd 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:

  • Allow the waitstaff to input the table number, and the number of 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, including types of drinks and entrees, with prices displayed. The menu is small, 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 before tax total and total with tax for the entire table (sales tax is 8%). Also, display the suggested tip amounts for 10%, 15%, 20% and 25% service qualities.
  • After a table is complete, the program should restart at the beginning, and continue until the manager selects quit. Before the program exits, it should report the total amount of money that should be in the register (ticket totals + tax for the entire day).

Design Details

Below, you are given some problem analysis and design details. You may find these helpful, and you are free to base your implementation on these details. Note that these details may not be complete. Feel free to add to or make changes to any of these details.

Problem Definition

  1. Problem Description:

Design and write a program that will allow a waitperson to take orders for each table, and calculate and display the per-person total, per-table total, recommended tip amounts,and overall daily total.

  1. List of Program Inputs:
    • Table number
    • Number of diners at table
    • Menu item ordered by a diner
  1. List of Program Outputs:
    • Menu of food items
    • Before tax total for a table of diners
    • 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 before tax total for the 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 and the grand total for the table

Display the total sales (after tax) for the day

Structure Summary

  1. Functions: List of Functions (with name, parameters, and return value description):
    • Name: get_table_number

Parameters:

Returns: a table number (as an int)

Description: Prompts user to enter a table number; collects and returns the user's input (as an int).

    • Name: get_number_of_diners_at_table

Parameters:

Returns: the number of diners at this table (as an int)

Description: Prompts user to enter the number of diners at this table; collects and returns the user's input (as an int).

    • Name: get_table_order

Parameters:

Returns: total for the table

Description: calls get_diner_order for each diner at this table; calls calculate_table_total by passing the total of all diners (total of table) before tax; calls display_diners_totals; calls display_table_total_info; Computes and returns the after tax total for the whole table.

    • Name: get_diner_order

Parameters:

Returns: before tax total for diner

Description: Calls display_menu_of_food_items, and then calls get_menu_item as many times as needed to collect the items ordered by this diner while accumulating the total of the item prices; Returns the before tax total for the diners.

    • Name: display_menu_of_food_items

Parameters:

Returns:

Description: displays the menu of available food items

    • Name: get_menu_item

Parameters:

Returns: menu item number

Description: Prompts the user to enter a food item number from the menu; collects and returns the item number the diner is ordering.

    • Name: display_diners_totals

Parameters:

Returns:

Description: Displays the before and after tax totals for each diner at this table.

    • Name: calculate_table_total

Parameters: table total before tax

Returns: after tax total for table

Description: Calculates and returns the after tax total for the table. Use sales tax = 8%

    • Name: display_table_total_info

Parameters: table total after tax

Returns:

Description: Displays the list of suggested tip amounts based on the input table total value. Prompts the user to enter the tip amount, collects it and adds it to the table total after tax. Display the grand_total amount after adding the total with tip amount. Returns the grand total.

    • Name: main_program

Parameters:

Returns:

Description: Repeatedly calls get_table_number, get_number_of_diners_at_table and get_table_order until the user reports that there are no more tables for today, while accumulating the total sales for the day; then outputs the total sales for the day.

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

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions

Question

3. Define the attributions we use to explain behavior

Answered: 1 week ago