Question: Must be completed using MATLAB. Write a program in a script file that calculates the cost of renting a car according to the following price

Must be completed using MATLAB.
Write a program in a script file that calculates the cost of renting a car according to the following price schedule Sedan SUV Daily Free miles (per Cost of additional Duration of rent Daily Free miles (per Cost of additional mile mile rate day) $79 $69 ay rate $84 80 $74 100 S64 120 1-6 days 7-29 days $0.69 S0.59 80 $0.64 30 or more $59 days $0.49 $0.54 The program should use switch-case (for the 2 types of vehicles) and then display the cost (rounded to cents) for the rent. It must be programmed to be completely general and work for either type of vehicle (Sedan or SUV), any number of days, and any number of miles. Then run your code for 2 sets of variables listed below. Do not use input (). You can run the two test input sets by writing a script that defines the variables for Test Inputs I has the generalized code that gives the cost, then re-assigns variables to the values for Test Inputs II and has the same code as previously. A more advanced way to do this is with the input variables defined in arrays and with a for-end loop. For-end loops will be taught next week and are not required for this problem Test Inputs I Type - 'Sedan', Days-10, Miles-769 Test InputsI Type 'SUV', Days 31, Miles 4056
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
