Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Scenario: You have decided to run a food truck with your friend that sells salads to the Mason community. For the truck to be successful,
Scenario: You have decided to run a food truck with your friend that sells salads to the Mason community. For the truck to be successful, you must create an application that helps determine the total cost to purchase one salad. The cost of one salad is determined by the number of ingredients contained within it and the type of salad dressing it contains, if any. The only possible options for salad dressing are: No Dressing, Balsamic Vinaigrette, Bleu Cheese, or Thousand Island. Note that salad dressing does not count as an ingredient. Working with your friend, you decide upon the following rules to help you determine the cost for one salad: Each salad has a base cost of $9.39 When the salad contains three ingredients or less, there is no additional charge When the salad contains more than three ingredients, but fewer than seven ingredients, there is an additional $2.85 charge When the salad contains seven or more ingredients, there is an additional $4.25 charge Selecting no salad dressing or Balsamic Vinaigrette adds no additional charge to the total salad cost, but selecting Bleu Cheese or Thousand Island adds an additional $1.29 to the salad cost All salads must be charged an additional 8.25% for sales tax of the total salad cost Create an application that will ask the user to provide the number of ingredients the salad will contain followed by the type of salad dressing the salad will contain, if any. Print a well-formatted report that displays the salad's base cost, the number of ingredients in the salad, the type of dressing selected (if any), the total cost of the salad before tax, the amount of the tax, and the grand total (including tax) While working with the program, if the user enters in any invalid values, the program must provide an error message, inform the user they should manually restart the program, and then immediately end. Programming Assignment 1: Solution Design Show testing using the desk checking table method, to include test data, expected results, and a desk checking table. Make sure your desk checking considers multiple cases including both valid and invalid test data to prove your algorithm will work in all cases
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started