Use javaFX and event handling concept to code the assignment program.
You are running a Computer shop where you are selling some computer parts.
Price for Mouse is $10.0 each
Price for USB is $20.0 each
Price for Charger is $15 each
Write code to design the following GUI. You can use any creative way to design your interface.
Write code to perform following task:
The three text boxes in this program initially disabled. To enter value in the each text box you would check mark the each check box for an item a customer was purchasing.
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 image would show output in the text area if you have two text field selected.
You can enter a discount in the Discount field if you wish. If a discount was entered, than total button subtract the discount amount from total of mouse and usb. Following image display sample run:
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 calculate 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
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.