Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I Need a help in Writing a Matlab script (program) to assist with calculating the cost for customer orders General Description: A materials supply company

I Need a help in Writing a Matlab script (program) to assist with calculating the cost for customer orders

image text in transcribed

General Description: A materials supply company offers bars of various lengths and metals for saleto manufacturing companies. Write a Matlab script (program) to assist with calculating the cost for customer orders. The 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. If the 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 $2.51 0.30 1.0 $1.49 Brass $1.78 Copper 0.85 $1.22 Steel 0.75 Here, 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 in the examples below Finally, the user is asked if they want to process another order (Yor N). If the answer is Y or 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 including shipping) This should NOT be printed after each order is completed...only after the user chooses to NOT process another order. (see below)

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

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 2012 Proceedings Part 2 Lnai 7197

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284892, 978-3642284892

More Books

Students also viewed these Databases questions

Question

Explain Industrial market segment.

Answered: 1 week ago

Question

Explain the market segmentation.

Answered: 1 week ago

Question

=+Are they specific or general in nature?

Answered: 1 week ago

Question

=+ What is the nature of the contracts or agreements with unions?

Answered: 1 week ago

Question

=+What is the procedure for labor relations in the workplace?

Answered: 1 week ago