Question: Topics: User Defined Functions and MATLAB Conditionals A online retailer has hired you to write a program to calculate the total cost of a customer's

 Topics: User Defined Functions and MATLAB Conditionals A online retailer hashired you to write a program to calculate the total cost of

Topics: User Defined Functions and MATLAB Conditionals A online retailer has hired you to write a program to calculate the total cost of a customer's order. First the retailer must enter the name and the price per unit for two different candies. Then, the customer is allowed to order as many units of each of the two candies as they would like Lastly, an invoice report) is generated displayed to the screen) under the following rules 1. All units up to and including the 20th are sold at full price 2. All unit in excess of 20 are sold at a 10% discount. 3. For each candy there must be a separate line indicating: o The candy's name o The candy's full unit price o How many units are being sold at full unit price o The resulting subtotal And if applicable, another line indicating o The candy's name o The candy's discounted unit price o How many units are being sold at discounted unit price o The resulting subtotal 4. There must be a line indicating the total of the order. 5. There must be a line indicating the sales tax on the total of the order (based on a 5% sales tax) 6. There must be a line indicating the grand total of the order. Finish the following MATLAB function and write a MATLAB Script that (uses that function) to satisfy the above description

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!