You are on page 1of 5

LAB EXAM QUESTIONS

1. Design a GUI application for Newspaper agency as per the given criteria :
The subscription amount for Hindustan Times is Rs.1200 per year and that of The Times of India is Rs.1000 per year.
Also, discount is offered according to the subscription period:
For 3 years: 5% discount.
For 5 years: 7.5% discount
For 10 years: 10%discount.
Calculate the discount and net amount to be paid by the customer.

2. A book publishing house has decided to opt for computerisation .the database will be maintained at the back-end
but you have to design the front-end for the company. You have to accept Book Code, Title, Author and Quantity
sold from the user.the price will be generated depending upon the book code. Net Price should be calculated on the
basis of the discount given:
Bookseller: 25%
School: 20%
Customer: 5%
3. Design a GUI application to accept a number from the user and display whether the number is a multiple of 3/5/7
or not on the click of Radio Buttons and Display message in Option Pane.

4. Design a GUI application to accept two numbers. According to the radio button selected, display the result on the
click of the calculate button and exit the application on clicking the exit button.

5. Design an application which converts between Fahrenheit and Celsius temperatures. Appropriate labels, titles and
user instructions should be displayed.
There should be two text fields, one for each temperature scale. The user types a temperature value in either of the text
fields; the other text filed displays the converted value. A control is to be provided for ending the program.
The following formulas below may be helpful:
F=9/5*C+32
C=5/9*(F-32)

6. The math editor interface is shown below. It performs the Add, Subtract and Multiply operations based on the
selections from the jComboBox. Write code under the get Result button to achieve the desired results.
7. An electric shop has announced the following seasonal discounts on the purchase of certain items .

Purchase in Amount in Rs. Discount on TV Discount on Music System

0-25000 5% 10%

25001-50000 10% 20%

>50000 15% 30%

Develop an application based on the above criteria, to input amount of purchase and the type of purchase (TV or Music
System using JRadioButton) by a customer.
Compute and print the net amount to be paid by a customer along with his name accepted in text field.
[hint: Discount=(Discount rate/100)*Amount of purchase
Net amount= amount of purchase - discount ]

8. The students of “Shiksha Vidhalaya” work for different extra curricular activities like ‘Community Outreach
Programme’, “Swachh Bharat Abhiyan”, and ‘Traffic Safety Club’. The programmer at the school has developed

GUI application as shown below.


A student can participate in more than one activities.
Each student gets 10 points for each activity-namely ‘Community Outreach Programme’, “Swachh Bharat Abhiyan”,
and ‘Traffic Safety Club.
A. When the “calculate Total score’ button is clicked, the points for each activity (that is selected) should be displayed
in the text field in front of that activity’s checkbox and the Total Score should be displayed in the appropriate text
field.
B. When the clear button is clicked all textfields and checkboxes should be cleared.
C. When stop button is clicked the application should close.
SQL Questions

(v) SELECT MAX(CALORIES) FROM SOFTDRINK;