2. CommodityCode.java (Use switch) A certain store has the following scheme: Commodity Code: commodities are discounted by 15% commodities are taxed by 12% commodities are charged as priced B Create a...


2. CommodityCode.java (Use switch)<br>A certain store has the following scheme:<br>Commodity Code:<br>commodities are discounted by 15%<br>commodities are taxed by 12%<br>commodities are charged as priced<br>B<br>Create a java program that reads a commodity code, quantity of the commodities bought and the unit<br>price. The program should output the amount to be paid by the customer.<br>Depicted below are sample outputs when the program is executed (the items in red bold characters are inputted by the user,<br>while the items in blue bold characters are calculated and outputted by the program):<br>Enter commodity code: A<br>Enter quantity of commodity: 2<br>Enter unit price: 53.25<br>Amount to be paid is P90.53<br>Enter commodity code: E<br>Invalid Code<br>Enter commodity code: B<br>Enter quantity of commodity: 2<br>Enter unit price: 53.25<br>Amount to be paid is P119.28<br>Enter commodity code: A<br>Enter quantity of commodity: 2<br>Enter unit price: 53.25<br>Amount to be paid is P106.50<br>

Extracted text: 2. CommodityCode.java (Use switch) A certain store has the following scheme: Commodity Code: commodities are discounted by 15% commodities are taxed by 12% commodities are charged as priced B Create a java program that reads a commodity code, quantity of the commodities bought and the unit price. The program should output the amount to be paid by the customer. Depicted below are sample outputs when the program is executed (the items in red bold characters are inputted by the user, while the items in blue bold characters are calculated and outputted by the program): Enter commodity code: A Enter quantity of commodity: 2 Enter unit price: 53.25 Amount to be paid is P90.53 Enter commodity code: E Invalid Code Enter commodity code: B Enter quantity of commodity: 2 Enter unit price: 53.25 Amount to be paid is P119.28 Enter commodity code: A Enter quantity of commodity: 2 Enter unit price: 53.25 Amount to be paid is P106.50

Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here