Preview

Sample Solution Algorithm to Determine Meal Charges

Satisfactory Essays
Open Document
Open Document
285 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Sample Solution Algorithm to Determine Meal Charges
Week 2 Activity – Meal Purchase

TCO #2– Given a simple business problem, design a solution algorithm that uses arithmetic expressions and built-in functions.

Assignment:
Your goal is to solve the following simple programming exercise. You have been contracted by a local restaurant to design an algorithm determining the total meal charges. The algorithm should ask the user for the total food purchase and the tip percent. Then, the algorithm will calculate the amount of a tip, a 7% sales tax, and the total meal charge (including tip). The food purchase, sales tax, tip amount, and total meal charge will need to be displayed to the customer.

Be sure to THINK about the logic and design first (IPO chart and pseudocode), then code the Visual Logic command line processing. Display all output using currency formatting (built-in Visual Logic function).

Advanced (optional): use a constants for the 7% sales tax.

Rubric:
When completed staple the following documents together neatly in 1,2,3,4 order: • This instruction sheet first • The IPO Chart, second • The Pseudocode, third • The Flowchart and output example last.

Point distribution for this application:
Meal Purchase
Document:
Points possible:
Points received
IPO Chart
6

Pseudocode
6

Flowchart
8

Total Points
20

IPO Chart:

Input
Processing
Output Enter Total Food Purchase Price

Calculate Food price
Add Tip %* Total Food Purchased
Add 7% tax * Total Food Purchased

Total Meal Charge

Pseudocode:

Begin mealPurchase

Total Food Purchased
Imput total Purchased Food Amount
Please enter the amount for tip percent
Imput tip percent
Set total tip = tip percent/ 100
Set total tip=total tip *
Total food purchased amount
Set total tax= sales tax/100
Set total tax= total tax* = total food purchased amount

End

Flowchart:

Example Output after execution:

You May Also Find These Documents Helpful

  • Better Essays

    Midterm Comm293

    • 5099 Words
    • 21 Pages

    No programmable calculators are permitted. Please show all calculations in an orderly and clear format for part marks. Time management is crucial. Be sure to attempt each question. No questions will be permitted during this examination. If you need to make an assumption, state it and continue. Read the questions carefully before making any assumptions. Question 1 (18 marks; suggested time 18 minutes) Revenue Recognition…

    • 5099 Words
    • 21 Pages
    Better Essays
  • Satisfactory Essays

    Week 6 HSM 260

    • 324 Words
    • 2 Pages

    4. Total variable cost for the lowest time period is calculated by multiplying the service volume by the variable cost per meal. The same calculation is used to determine the total variable cost for the highest time period as well.…

    • 324 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    PRG/420 Week 3

    • 1025 Words
    • 5 Pages

    User 's total compensation // Display welcome message System.out.println("Hello, welcome to the Simple Commission " + "Calculator.") ; // Insert a blank line System.out.println(); // Create a Scanner object to read input Scanner keyboard = new Scanner(System.in); // Get user credentials System.out.println("Please enter your first name.") ; firstName = keyboard.nextLine(); System.out.println("Please enter your last name.")…

    • 1025 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    Pt1420 week 2

    • 320 Words
    • 3 Pages

    A customer in a store is purchasing five items. Design a program that asks for the price of each item, and then displays the subtotal of the sale, the amount of sales tax, and the total. Assume the sales tax is 6 percent.…

    • 320 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Hrm 3263 Assignment 3

    • 512 Words
    • 3 Pages

    Based on the menu prices you listed on your menu in Part Two of this assignment, identify the average check for each meal service in your menu program.…

    • 512 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Programing Problems

    • 721 Words
    • 3 Pages

    RegularHours * HourlyRate + OvertimeHours * (HourlyRate * 1.5) End Gross Pay module Tax Module Tax=GrossPay*.30 End Tax Module Net Pay Module NetPay = GrossPay –Tax – Parking…

    • 721 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Assignment1

    • 837 Words
    • 3 Pages

    Billy 's Gut Busting Buffet - Billy is opening a new buffet restaurant and wants to use Excel to build a weekly budget forecast and estimate his profit. He has inputs and assumptions for revenue and expenses in the spreadsheet. Now he needs to set up his weekly budget forecast to show the profit he can expect based on the input he has provided. Research conducted has indicated that the number of customers Billy can expect in a week is directly tied to the price of an individual buffet meal (see "Buffet Price and associated number of customers" data in Inputs and Assumptions section of start file spreadsheet). All customers will be charged the same meal price, Billy must determine what price to charge for a meal ($12, $15, $18).…

    • 837 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Checkpoint 2

    • 294 Words
    • 2 Pages

    The manager of the Supermarket would like to be able to compute the unit price for the product sold here. To do this, the program should input the name and price of an item and its weight in pounds and ounces.…

    • 294 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    According to the Iowa Department of Education website, there are 200 students attending the Paton-Churdan K-12 School in the 2016-2017 school year. Paton-Churdan is located in the small, rural town of Churdan, about 13 miles north of Jefferson. Of the 200 students, about 3.5% are Hispanic, 5.5% are multiracial, and 1.5% is Asian, making Caucasian the largest group at 89.5%. In looking at these percentages, it is easy to see that we do not fit into the idea of a diverse culture. However, we do have a large group of students who are found on the Free and Reduced Lunch program. There are 92 students who qualify for this program, close to half of the student population. According to the Iowa State University-Iowa School District Profiles, during…

    • 447 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    * This program allows a user to calculate a mortgage payment based on their input.…

    • 469 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Currency Conversion Design Assignment—Hierarchy Chart Complete a hierarchy chart for the application by typing into the textboxes below. Main Module Display_Results Module Get_Int_Value Module Display_MenuModule Convert_Currency Module Currency Conversion Development Assignment—Flowcharts Complete the flowcharts for the assignment by typing into the textboxes below.…

    • 337 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Costing Sheets

    • 385 Words
    • 2 Pages

    I have a dish of grilled lamb chops with tomatoes and olives, honey lime carrots, and roasted red potatoes with garlic and rosemary. After costing out every item in the recipe I got a subtotal of $104.56. Once I introduced a Q-factor of 3% into the costing, I came up with a subtotal with Q-factor of $107.70. My yield of the dishes is 10 plates, so taking the subtotal with a Q-factor and dividing it by 10, makes it $10.77 per dish, then add in a dollar for extra cost makes it $11.77 per plate. My restaurant wants a food cost of 33%, so factoring that in it makes it $35.67 for a suggested menu selling price. In all reality I can sell this dish for $34.00, setting the food cost at 34.6%.…

    • 385 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Automation Billing System

    • 3190 Words
    • 13 Pages

    The project is on Supermarket Billing. Supermarket is the place where customers come to purchase their daily using products and pay for that. So there is a need to calculate how many products are sold and to generate the bill for the customer. In our project we have 3 users. First is the data entry operator who will enter the products in database. Second one is the administrator who will decide the taxes and commissions on the products and can see the report of any product. Third one is the bill calculating operator who will calculate the bill and print.…

    • 3190 Words
    • 13 Pages
    Good Essays
  • Powerful Essays

    Purpose : Create framework for trade-off analysis for selection of components in a small subsystem.…

    • 17038 Words
    • 69 Pages
    Powerful Essays
  • Good Essays

    Information

    • 612 Words
    • 3 Pages

    During bus journey, one of the passenger on an e-ticket appears should carry the original identity card such as: Driving License, Election Card, Ration Card, Photo ID card issued by Central/State Govt./Private Organisations, AdharCard, Pan Card, Passport, Credit Card with Photo identification, Student ID issued by any Institute, Pass Book with Photo issued by any Nationalised Bank ,CAT CARD issued by APSRTC.…

    • 612 Words
    • 3 Pages
    Good Essays