Question: MATLAB COP2271L MATLAB Lab 3: Program Design on Conditionals Pizza App Software Key programming concepts: If statements, conditions, and, or Approximate lines of code: 22



MATLAB
COP2271L MATLAB Lab 3: Program Design on Conditionals Pizza App Software Key programming concepts: If statements, conditions, and, or Approximate lines of code: 22 (does not include comments or white space) Commands you can't use: return, goto Program Inputs Pizzas available today: A) Cheese B) Hawaiian C) Meat Lovers D) Pacific Veggie E) Pepperoni F) Sausage G) Spinach and Feta H) The Works Pizza choice: - User will always enter a single capital letter but it may not match an actual pizza choice Choose your size - 1) Small 2) Medium 3) Large: User will always enter a numeric value but it may not be 1-3 Number of pizzas to purchase: - User will always enter a numeric value but they must order at least 1 pizza but no more than 25 Program Outputs Total cost: $XX.XX - replace XX. XX with the total ticket cost showing 2 decimal places Invalid option; please try again. Display this message if the user choose an improper option for any of the questions Assignment Details Your task is to create a program for purchasing pizzas! The program will only support a few select pizza types and sizes but will allow the user to select their type of pizza, size, and quantity. The base price of each pizza depends upon the size: Pizza Size Base Prize Small $9.99 Medium $11.99 Large $13.99 1 COP2271L MATLAB Lab 3: Program Design on Conditionals Furthermore, each specialty pizza is an extra $2.00 above the base price: Regular Pizzas Cheese, Pepperoni, Sausage Specialty Pizzas Hawaiian, Meat Lovers, Pacific Veggie, Spinach with Feta, The Works For example, a large Pepperoni pizza costs $13.99 but a large Hawaiian pizza is $15.99. Sample Output The following test cases do not cover all possible scenarios (develop your own!) but should indicate if your code is on the right track. To guarantee full credit, your program's output should match the output below. Test Case 1: Pizzas available today: A) Cheese B) Hawaiian C) Meat Lovers D) Pacific Veggie E) Pepperoni F) Sausage G) Spinach and Feta H) The Works Pizza choice: L Invalid option; please try again. Test Case 2: Pizzas available today: A) Cheese B) Hawaiian C) Meat Lovers D) Pacific Veggie E) Pepperoni F) Sausage G) Spinach and Feta H) The Works Pizza choice: D Choose your size - 1) Small 2) Medium 3) Large: 3 Number of pizzas to purchase: 1 Total cost: $15.99 Test Case 3: Pizzas available today: A) Cheese B) Hawaiian C) Meat Lovers D) Pacific Veggie E) Pepperoni F) Sausage G) Spinach and Feta H) The Works Pizza choice: A Choose your size - 1) Small 2) Medium 3) Large: 1 Number of pizzas to purchase: -5 Invalid option; please try again. Test Case 4: Pizzas available today: A) Cheese B) Hawaiian C) Meat Lovers D) Pacific Veggie E) Pepperoni F) Sausage G) Spinach and Feta H) The Works Pizza choice: E Choose your size - 1) Small 2) Medium 3) Large: 2 Number of pizzas to purchase: 10 Total cost: $119.90 2 COP2271L MATLAB Lab 3: Program Design on Conditionals Test Case 5: Pizzas available today: A) Cheese B) Hawaiian C) Meat Lovers D) Pacific Veggie E) Pepperoni F) Sausage G) Spinach and Feta H) The Works Pizza choice: H Choose your size - 1) Small 2) Medium 3) Large: 4 Invalid option; please try again. 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
