Answer to Question #147836 in Quantitative Methods for pathima

Question #147836
An automobile dealership uses CODE = 1 for new automobiles, CODE = 2 for used automobiles, and CODE = 3 for separate accessories. A salesman’s commissions are as follows: on new automobile, 3% of the selling price but a maximum of $300; on used automobile, 5% of the selling price but with a minimum of $75; on accessories, 6% of selling price.

1. Draw a flowchart that inputs CODE and PRICE and outputs COMMISSION.
2. Write a pseudocode programme that inputs CODE and PRICE and outputs COMMISSION
1
Expert's answer
2020-12-02T01:44:10-0500

1) Flowchart



2) Pseudocode

int calculateCommission(int code, int price){

if code == 1

return minimum of {price*0.03, $300}

else if code == 2

return maximum of {price * 0.05, $75}

else if code == 3

return price*0.06

else

return 0

}


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS