DECISION CONTROL STRUCTURE (IF) PROBLEM Instruction: A certain store has the following scheme: Commodity Code: X- commodities are discounted by 8% Y. commodities are taxed by 11% z. commodities are...


DECISION CONTROL STRUCTURE (IF) PROBLEM<br>Instruction:<br>A certain store has the following scheme:<br>Commodity Code:<br>X- commodities are discounted by 8%<br>Y. commodities are taxed by 11%<br>z. commodities are charged as priced<br>Using a Decision Control Structure (if), create a flowchart and a java program that<br>reads a commodity code, quantity of the commodities bought and the unit price and<br>output the amount to be paid by the customer.<br>Depicted below are sample outputs when the program is executed (the items in bold<br>characters are inputted by the user, while the items in bold italic characters are<br>calculated and outputted by the program):<br>Enter commodity code: X<br>Enter quantity of commodity: 2<br>Enter unit price: 53.25<br>Amount to be paid is P97.98<br>Enter commodity code: E<br>Invalid Code<br>Enter commodity code: Y<br>Enter quantity of commodity: 2<br>Enter unit price: 53.25<br>Amount to be paid is P/18.22<br>Enter commodity code: Z<br>Enter quantity of commodity: 3<br>Enter unit price: 53.25<br>Amount to be paid is P159.75<br>Required: The flowchart, the java file (FamilyName_CommodityCode.java) containing<br>the code and 4 image files (Sample1, Sample2, Sample3, and Sample4) containing<br>different sample input/output of the program.<br>

Extracted text: DECISION CONTROL STRUCTURE (IF) PROBLEM Instruction: A certain store has the following scheme: Commodity Code: X- commodities are discounted by 8% Y. commodities are taxed by 11% z. commodities are charged as priced Using a Decision Control Structure (if), create a flowchart and a java program that reads a commodity code, quantity of the commodities bought and the unit price and output the amount to be paid by the customer. Depicted below are sample outputs when the program is executed (the items in bold characters are inputted by the user, while the items in bold italic characters are calculated and outputted by the program): Enter commodity code: X Enter quantity of commodity: 2 Enter unit price: 53.25 Amount to be paid is P97.98 Enter commodity code: E Invalid Code Enter commodity code: Y Enter quantity of commodity: 2 Enter unit price: 53.25 Amount to be paid is P/18.22 Enter commodity code: Z Enter quantity of commodity: 3 Enter unit price: 53.25 Amount to be paid is P159.75 Required: The flowchart, the java file (FamilyName_CommodityCode.java) containing the code and 4 image files (Sample1, Sample2, Sample3, and Sample4) containing different sample input/output of the program.

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here