Page 34 - IP
P. 34
(f) Mr. Suman, a programmer in New Era Programming World has designed a registration 6
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.
OR
(f) Write java statement to make the Net Fee text field named txtNetFee un-editable at run
time.
5. (a) Write any one similarity and one difference between primary key and unique Constraint 2
(b) Ms. Pari, a beginner in SQL is not able to understand the meaning of “Cancelling a 2
Transaction”. Help her in understanding the same. Also mention suitable command for it
(c) Consider the following tables Library given below: 4
5