Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Matlab question. Use variables, inputs, outputs, and if statements CANNOT use return, or goto commands. PLEASE show code Key programming concepts: variables, input, output, if
Matlab question. Use variables, inputs, outputs, and if statements CANNOT use "return", or "goto" commands.
PLEASE show code
Key programming concepts: variables, input, output, if statements Approximate lines of code: 22 (does not include comments or white space) Commands you can't use: return, goto Program Inputs - Enter your size: - User will always enter a whole number but it may not match the correct sizes - If the choice is invalid, display Invalid size! Please start another order... - Enter base flavor: - User will always enter a single capital letter but it may not match a flavor option - If the choice is invalid, display Invalid flavor! Please start another order... - Enter your topping: - User will always enter a single capital letter but it may not match a topping option - If the choice is invalid, display Invalid topping! Please start another order... Program Outputs - Final price with tax: $XX.XX - Calculate the user's final price, including a 6% sales tax, to 2 decimal places Assignment Details Automation is used everywhere in engineering, from factory floors to self-driving vehicles. For this assignment, you will develop a software interface for an autonomous ice cream kiosk! Companies such as FROYO Robots have been implementing these kiosk for a few years now in malls and other public areas. Essentially, a user makes their ice cream selection, including a topping, and their dessert is made right in front of them without any human interaction! Your ice cream kiosk will sell three different sizes: Small at \$3.99, Regular at \$4.99 and Large at \$5.99. It also has 4 flavors to choose from: Vanilla, Chocolate, Strawberry, and Birthday Cake, along with 4 different toppings (\$0.99 each): Sprinkles, Hot Fudge, Caramel, Brownie Bits. Present this information using the following display in your program: Welcome to the Ice Cream Kiosk! Make your choices below: Sizes: 1)Small 2) Regular 3) Large Flavors: A) Vanilla B) Chocolate C) Strawberry D) Birthday Cake Toppings: E) Sprinkles F) Hot Fudge G) Caramel H) Brownie Bits I) None Your program must calculate the final sales price, including a 6% sales tax, for a single ice cream order. Please note that the user will only make 1 order at a time and an only choose 1 topping per ovder. If the user tries to place an order that is invalid, simply state this on the screen and end the program (do not try to restart the ordering process). The progmm should NOT ask any more questions after receiving an invalid option. 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 exactly match the output below. Test Case 1: Welcome to the Ice Cream Kiosk! Make your choices below: Sizes: 1)Small2)Regular 3) Large Flavors: A) Vanilla B) Chocolate C) Strawberry D) Birthday Cake Toppings: E) Sprinkles F) Hot Fudge G) Caramel H) Brownie Bits I) None Enter your size: 5 Invalid size! Please start another order... Test Case 2: Welcome to the Ice Cream Kiosk! Make your choices below: Sizes: 1)Small2)Regular 3) Large Flavors: A) Vanilla B) Chocolate C) Strawberry D) Birthday Cake Toppings: E) Sprinkles F) Hot Fudge G) Caramel H) Brownie Bits I) None Enter your size: 1 Enter base flavor: A Enter your topping: I Final price with tax: $4.23 Test Case 3: Welcome to the Ice Cream Kiosk! Make your choices below: Sizes: 1) Small 2) Regular 3) Large Flavors: A) Vanilla B) Chocolate C) Strawberry D) Birthday Cake Toppings: E) Sprinkles F) Hot Fudge G) Caramel H) Brownie Bits I) None Enter your size: 3 Enter base flavor: u Invalid flavor! Please start another order... Test Case 4: Welcome to the Ice Cream Kiosk! Make your choices below: Sizes:1)Small2)Regular3)Large Toppings: E) Sprinkles F) Hot Fudge G) Caramel H) Brownie Bits I) None Enter your size: 2 Enter base flavor: C Enter your topping: G Final price with tax: $6.34 Test Case 5: Welcome to the Ice Cream Kiosk! Make your choices below: Sizes: 1)Small2)Regular3)Large Toppings: E) Sprinkles F) Hot Fudge G) Caramel H) Brownie Bits I) None Enter your size: 3 Enter base flavor: D Enter your topping: E Final price with tax: $7.40Step 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