Professional Documents
Culture Documents
Assessment - 5.
L 19+L20 - Time : 8.00 - 9.30 pm Date : 24/11/2021
Max. Marks : 20
General Instructions
2. Copy the allotted question along with the question number and paste on the word
document, which you are about to submit.
3. Compile both the source (.java) program and (output) files in the same word
document and make it as a single PDF file and upload as a single program. The
program should be followed by its output.
Please follow the deadline and the time. ie. The students have to upload their pdf
before their Lab session or can take at the maximum five minutes after the Lab
session gets over. The Assessment cannot be submitted after the deadline. The Vtop
doesn’t have the option for late submission, so if the student fails to submit the
assignment, the mark for the assignment will be provided as ZERO.
1. The offer-and-save store has developed the following data entry screen for its
operations. The store offers 3 different types of membership discount schemes for its
regular customers. Platinum members get a discount of 10% on all their purchases,
Gold members get 5% and Silver members get 3% discount.
Write a java code to add the following functionalities:-
b) To remove the decimal part from the text field NET so that the net amount contains
only the integer portion in rupees.
c) The GOLD radio button should be selected by default when the form is opened. Also
write the appropriate event.
d) To calculate amount, discount and net amount as per the descriptions and conditions.
The formulas are as follows:- Amount = quantity * rate and Net Amount = Amount -
Discount
3. Glamour Garments has developed a GUI application for their company as shown below
The company accepts payments in 3 modes- cheque , cash and credit cards. The discount
given as per mode of payment is as follows.
If the Bill Amount is more than 15000 then the customer gets an additional discount of
10% on Bill Amount.
(i) Write the code to make the textfields for Discount (named txtDisc) and Net Amount
(a) Write a method that takes “Bill Amount” as argument and calculates discount when
"Calculate Discount" button is clicked and it should be displayed in the discount textfield.
"Calculate Net Amount" button (named btnCalcNetAmt) should also be enabled.
(b) Write a method to calculate Net Amount when"Calculate Net Amount" button is
clicked and it should be displayed in the net amount textfield.