Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Very confused and problem has to use a while loop. image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

9. Why do companies segment markets?

Answered: 1 week ago