Assignment-3 Worth 3.5% Use javaFX and event handling concept to code the assignment program. You are running a Computer
Posted: Tue Jul 12, 2022 8:16 am
This would enable that item's text field so you can enter the quantity. You would do this for each type of item the customer was purchasing. After entering the quantities of each item, you would click the Total button. Total button would calculate the price of each item and add them to calculate final total. Sample run: Following run would show output in the text area if you have two text field selected. Subtract Discount 0 TOTAL RESET EXIT Mouse $50 USB 560 Discount 50 Total $110 Mouse @$10 each USB $20 each Charger 15 each I You can enter a discount in the Discount field if you wish. If a discount was entered, then total button subtracts the discount amount from total of mouse and usb. Check the following sample run:
5 Subtract Discount 10 TOTAL RESET Mouse $50.0 USB = $60.0 Discount $10.0 Total = $100.0 EXIT Mouse @510 each USB @$20 each Charger @15 each Your program needs to work for any combination of text field you select to enter value. For example, calculate total of USB and Charger. Another example would be calculated total of USB only Another combination would be calculate total of Mouse, USB and Charger So please check all possible combination to calculate total and display in text area Marks will be deducted if all the combination don't produce the correct answer. Write code for the Reset button which puts the form back to its original state (quantity text fields disabled and cleared, check boxes unchecked, text area and discount field cleared). Write code for Exit button which exits the program confirming with user. Use proper data validation to read value from each text box. Use Internal Standard document for commenting and name convention rule.