Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone help me in writing a Matlab script (program) to assist with calculating the cost for customer orders? the right side is Example Runs.

Can someone help me in writing a Matlab script (program) to assist with calculating the cost for customer orders? the right side is Example Runs.

image text in transcribed

Project 3: Metal Bar Orders Due: checked nto Canvas by midnight April 7 Learning objectives: Use of variables, assignments and arithmetic Use of User Input and User Output Use of Decisions Use of a Loop to repeat a process Use of the Summation Strategy within a Loop General Description: A materials supply company offers bars of various le ngths and metals for sale to manufacturing companies. Write a Matlab script (program) to assist with calculating the cost for customer orders he supply company offers bars in three metals: Aluminum, Brass, Copper and Steel. They offer bars in custom lengths Specifications: First, the program should clear the screen and display a list of metals, with a number for each, and ask the user which metal to use. Ifthe user enters an invalid selection, assume the metal is Steel Next, the program should ask the user to enter the bar size, in feet, and the number of bars ordered. Next, the program decides on the cost per foot and weight per foot, based on the metal chosen. The values are: Metal Cost per foot Weight: pounds per foot Aluminum S2.51 0.30 Brass $1.49 1.0 $1.78 0.85 Copper Steel $1.22 0.75 ere, it should also decide on the metal name to be printed in the report The program then calculates the total length of all bars ordered, the total cost of the bars and the total weight. It then calculates the shipping charge as $0.25/pound, and add this to the total cost of the bars to get the total price. Round the total price to two digits past the decimal point. The program prints a report with the calculated values as shown n the examples below Finally, the user is asked if they want to process another order (Y or N). If the answer is Yor y, the entire above process should be repeated. If any other answer is given, the program ends As the program ends, it should print the total dollar cost of bars sold for the day (not includingshipping). This should NOT be printed after each order is completed .only after the user chooses to NOT process another order. (see below) Metal Bar Order Aluitinum Brass Copper Steel Enter metal number Enter bar length (feet) Enter the n umbe of bars Metal Brass Total length fee Total Weight 1 pounds t of bars: Cos 1.49 $0.25 Shipping Total $1.74 Process another order? (Y/N) Metal Bar Order Aluruinuitu Brass Copper Steel Enter metal number 999 Enter bar length (feet) of bars: 10 Enter the numbe Metal Steel Total length: 20 feet Total Weight 15 pounds t of bars: $24.4 Cos $3.75 Shipping Total $28 15 valid, valiues for Steel were used Since 999 was in Y/N Process anothe r order Metal Bar Order Aluminum Brass Copper Steel Enter metal. mber nu Enter bar length feet he number of bars Enter t Metal Aluminum Total leng 1 feet. th Total Weight 0.3 pounds of bars: $2.5 Cost Shipping $0.075 Total $2.59

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

Step: 3

blur-text-image

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

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions