Mr. Suman, a programmer in New Era Programming World has designed a registration page for a hobby club as shown below:
Fee for different hobbies are as follows:
Hobby |
Fee |
Dancing |
1000 |
Drawing |
1500 |
Music |
2000 |
Singing |
2500 |
Help him in writing the code to do the following:
(i) As per the hobby chosen in the hobby combo box, fee should be displayed in the respective text field named t1 as per the criteria given above after clicking on “Check Fee” button.
(ii) If a candidate belongs to “Jr. Category” then a discount of 10% should be given in displayed in the text field.
(iii) After clicking on the “Net Fee” button, Net Fee should be calculated and displayed in the respective text field as per the given formula:
Net Fee = Fee – Discount
(iv) Write suitable java code to close the application.
(v) Write java statement to add a new hobby “Reading” in the combo box at run time.