You are on page 1of 5

CSE 1007 - Programming in JAVA

Assessment - 5.
L 19+L20 - Time : 8.00 - 9.30 pm Date : 24/11/2021

Faculty : Prof. A. Anitha

Max. Marks : 20
General Instructions

The students allotted with the question number is available at the


end of the document.
1. Write your Name, Regno, Course code, Course Title, Slot on the top of the word
document.

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:-

a) to disable the text fields AMOUNT, DISCOUNT AND NET.

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

2. The YOUWE Event Managing Company is organizing a shopping festival in the


Shopping Mall. The company gives a discount on the total amount spend (in all the
shops) in the mall. The discount is given based on the credit card used. The following
is the layout of the form:-

Write the Java code for the following:-


i) To display the message “Thank You for shopping” and to close the application when
EXIT button is clicked.
ii) To clear all the text fields when “clearALL” button is clicked and set the default choice
to VISA.
iii) To apply a check so that user could not enter negative or zero value in "Shopping
Amount‟ text field. If user does so, the text field should be made blank and a warning
message should be displayed.
iv) Calculate and display discount and net price in appropriate text fields.

Net Price= Shopping Amount – Discount


The discount is calculated based on credit card and total shopping amount as follows:

Credit Card Type Shopping Discount(%)


Amount(Rs.)
VISA <5000 10
>=5000 20
XYZ <10000 15
>=10000 25
ABC <8000 12
>=8000 15

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

(named txtNetAmt) uneditable.

(ii) Write code to do the following:

(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.

REGISTER Fculty Marks /


NO NAME Q.no incharge remarks
19BIT0167 J UDAY KIRAN 1 Anitha
THUTUPALLI Anitha
19BIT0238 SHANMUKHAVAMSIKRISHNA 2
20BIT0048 KARAN GUPTA 3 Anitha
20BIT0078 UDBHAV SHARMA 1 Anitha
AAZIM AJMAL Anitha
20BIT0125 SHAUKATHALI P 2
20BIT0148 NISHANT MISHRA 3 Anitha
MOTURU VENKATA NIKITH Anitha
20BIT0163 CHOWDARY 1
20BIT0203 RISHIDEEP SINGH RATHORE 2 Anitha
20BIT0210 SHRADDHA SUMAN 3 Anitha
20BIT0212 TISHA ANIL CHORDIA 1 Anitha
20BIT0226 KUNCHAKURI RITHESH 2 Anitha
20BIT0227 TARUNIKA AGARWAL 3 Anitha
20BIT0238 CHAVAN MUKUL MANISH 1 Anitha
20BIT0245 AADITYA KUMRA 2 Anitha
20BIT0259 AKSHAT KHANDELWAL 3 Anitha
20BIT0261 RUSHIL SAINI 1 Anitha
20BIT0262 ESHAN GUPTA 2 Anitha
Senthil
20BIT0270 NIMISH JAIN 3
Senthil
20BIT0280 SIDDHANT ANCHAL 1
Senthil
20BIT0292 UDITH SHYAMSUKHA 2
Senthil
20BIT0301 DEVIKA VARSHNEY 3
Senthil
20BIT0342 VINEET JAIN 1
Senthil
20BIT0349 ADITYA RANJAN 2
MADABHUSHI PRIYA Senthil
20BIT0354 SAAKETH 3
Senthil
20BIT0374 TRISHIT DEVENDER GUPTA 1
Senthil
20BIT0384 SHIVAM SINGH 2
Senthil
20BIT0389 SALONI AGARWAL 3
Senthil
20BIT0396 CHUNDURI ATIRATH 1
Senthil
20BIT0427 AKSHIT NEGI 2
Senthil
20BIT0428 SANYAM JAIN 3
Senthil
20BIT0431 SRIHARINI PADMANABHAN 1
Senthil
20BIT0436 VARUN BHATTACHARYA 2
Senthil
20BIT0439 ATHARV KOTHARI 3
Senthil
20BIT0447 HARSHIT GUPTA 1
Senthil
20BIT0448 MASTER MUSKAN 2

You might also like