Question

The cost per operating operating hour for rented construction machine is $10 per hour for the...

The cost per operating operating hour for rented construction machine is $10 per hour for the first 10 hours, $8 per hour for each of the next 10 hours and $7 per hour in excess of 20 hours. Value for hours are 6 16 40. Don’t ask user to input these values. Write Matlab code using if, elseif, else to determine total cost. Use variable names rentalHours and totalCost

Homework Answers

Answer #1

?clc;

close all;

clear all;

Hours=[6 16 40];

totalCost=0;

for i=1:length(Hours)

rentalHours=Hours(i)

if rentalHours<10

totalCost=(rentalHours*10)

elseif rentalHours>10 && rentalHours<20

totalCost=totalCost+(10*10);

totalCost=totalCost+((rentalHours-10)*8)

elseif rentalHours>20

totalCost=totalCost+(10*10);

totalCost=totalCost+(10*8);

totalCost=totalCost+((rentalHours-20)*7)

end

end

?Results:

rentalHours = 6

totalCost = 60

rentalHours = 16

totalCost = 208


rentalHours = 40


totalCost = 528

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
A plant manager considers the operational cost per hour of five machine alternatives. The cost per...
A plant manager considers the operational cost per hour of five machine alternatives. The cost per hour is sensitive to three potential weather conditions: cold, mild, and warm. The following table represents the operations cost per hour for each alternative-state of nature combination: States of Nature Weather related cost per hour Alternatives Cold cost/day Mild cost/day Warm cost/day Machine 1 $42 $40 $45 Machine 2 $45 $42 $47 Machine 3 $40 $35 $54 Machine 4 $60 $30 $48 Machine 5...
A plant manager considers the operational cost per hour of five machine alternatives. The cost per...
A plant manager considers the operational cost per hour of five machine alternatives. The cost per hour is sensitive to three potential weather conditions: cold, mild, and warm. The following table represents the operations cost per hour for each alternative-state of nature combination: Alternatives States of Nature EMV Weather related cost per hour Cold cost/day Mild cost/day Warm cost/day Machine 1 $42 $40 $45 Machine 2 $45 $42 $47 Machine 3 $40 $35 $54 Machine 4 $60 $30 $48 Machine...
Write a C++ program that converts time of day from a 24-hour notation to a 12-hour...
Write a C++ program that converts time of day from a 24-hour notation to a 12-hour notation. For example, it should convert 14:25 to 2:25 PM. (A) The user provides input as two integers separated by ‘:’. The following function prototype should capture the user inputs as described below: void input(int& hours24, int& minutes); //Precondition: input(hours, minutes) is called with //arguments capable of being assigned values. //Postcondition: // user is prompted for time in 24 hour format: // HH:MM, where...
A construction company has three choices of the type of machine to be used for their...
A construction company has three choices of the type of machine to be used for their project (interest rate is 7% for all options). The choices are as following: a. Machine sold by manufacturer A- This machine has an initial cost of $750,000, Salvage value of 100,000 sold after 50 years, and the variable cost of $55 per hour and maintenance cost of $4 per hour of usage. b. Machine sold by manufacturer B- This machine has an initial cost...
A construction company has three choices of the type of machine to be used for their...
A construction company has three choices of the type of machine to be used for their project (interest rate is 7% for all options). Which Manufacturer should this company choose? (Show calculations and draw graphical representation)The choices are as following: a. Machine sold by manufacturer A- This machine has an initial cost of $750,000, Salvage value of 100,000 sold after 50 years, and the variable cost of $55 per hour and maintenance cost of $4 per hour of usage. b....
Fixed Cost per Month Cost per Repair-Hour   Wages and salaries   $ 21,200      $ 15.00       Parts and...
Fixed Cost per Month Cost per Repair-Hour   Wages and salaries   $ 21,200      $ 15.00       Parts and supplies       $ 7.40       Equipment depreciation   $ 2,720      $ 0.40       Truck operating expenses   $ 5,770      $ 1.80       Rent   $ 4,620              Administrative expenses   $ 3,830      $ 0.60    For example, wages and salaries should be $21,200 plus $15.00 per repair-hour. The company expected to work 2,600 repair-hours in May, but actually worked 2,500 repair-hours. The company expects its sales to be $50.00...
A coal-fired power plant can produce electricity at an operating cost of $0.06 per kilowatt-hour when...
A coal-fired power plant can produce electricity at an operating cost of $0.06 per kilowatt-hour when running at its full capacity of 30 megawatts per hour, $0.16 per kilowatt-hour when running at 20 megawatts per hour, and $0.24 per kilowatt-hour when running at 10 megawatts per hour. A gas-fired power plant can produce electricity at a variable cost of $0.12 per kilowatt-hour at any capacity from 1 megawatt per hour to its full capacity of 5 megawatts per hour. The...
iii) Brand Corporation has provided the following information: Cost per Unit Cost per Period Direct materials...
iii) Brand Corporation has provided the following information: Cost per Unit Cost per Period Direct materials $ 4.90 Direct labor $ 4.00 Variable manufacturing overhead $ 1.60 Fixed manufacturing overhead $ 8,700 Sales commissions $ 2.00 Variable administrative expense $ 0.35 Fixed selling and administrative expense $ 5,700 For financial reporting purposes, the total amount of period costs incurred to sell 3,000 units is closest to: Multiple Choice Top of Form $12,750 $7,050 $5,700 $8,700 Bottom of Form Bottom of...
Weller Company’s flexible budget for manufacturing overhead (in condensed form) follows:     Cost     Formula          (per machine       &n
Weller Company’s flexible budget for manufacturing overhead (in condensed form) follows:     Cost     Formula          (per machine         Machine-Hours   Overhead Costs            hour)  8,000    9,000    10,000 Variable costs   $1.05  $ 8,400 $ 9,450 $10,500 Fixed costs       24,800   24,800   24,800 Total Overhead Costs    $33,200 $34,250 $35,300 The following information is available for a recent period: a. The denominator activity of 8,000 machine-hours was chosen to compute the predetermined overhead rate. b. At the 8,000 standard machine-hours level of activity, the company should produce 3,200 units of product. c....
123 Inc. is considering purchasing a new machine. The machine will cost $3,250,000. The machine will...
123 Inc. is considering purchasing a new machine. The machine will cost $3,250,000. The machine will be used for a project that lasts 3 years. The expected salvage of the machine at the end of the project is $800,000. The machine will be used to produce widgets. The marketing department has forecasted that the company will be able to sell 280,000 widgets per year. The marketing department believes that the company will be able to charge $22 per widget. The...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT