Question: Very confused and problem has to use a while loop. MATLAB Decisions and Loops (Individual 10 points) Problem 1 of 2 (5 points): A farm
MATLAB Decisions and Loops (Individual 10 points) Problem 1 of 2 (5 points): A farm offers fall visitors the option of picking apples and pumpkins. They are trying to automate the process. The farm offers three types of apples and one type of pumpkin. Pumpkins cost $5.99 each. Fuji apples cost $2.50 per kilogram, Gala apples cost $3.50 per kilogram, and Red apples cost $4.5 per kilogram. The typical weights of the Pumpkins are over 200 grams and up to 1500 grams, and the typical weights of the Apples are: Fuji Less than 80 grams Gala Between 80 and 120 grams Red More than 120 grams and less than 150 grams Please write a MATLAB script that will allow the farm to calculate the bill and provide a detailed invoice when someone risits. The user of the program will need to weight their products and provide the weights of all the products collected as a vector. Use Comments in your code. Your program should output a final invoice which contains the number of Pumpkins, Fuji Apples, and Gala Apples, and the final amount the client needs to pay (including 7% sales tax). Please use the following data from a random client to test your code: Product Weight Product Weight 180 589 67 120 1002 54 138 2 7 8 98 9 1480 10 1540
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
