Beruflich Dokumente
Kultur Dokumente
• Using a JButton (Compute) event handler, show the total, average result
and grade in different JtextFields control.
• Write the code for clear button to clear all the TextFields content.
• Write the code for Exit button to exit the application.
Assignment 2
Note that the sales entry should not be spaced. Calculate the total incentives
as: Sales amount*incentive. The feedback will be implemented in JCheckBox
controls.
Description of the project: Mr. Sundaram with his family visited Big Bazar
Shopping mall. His family members purchased a variety of products including
garments. The total amount goes into some thousands. The owner of the
shopping mall provides handsome discounts of credit cards such as:
Card Type Discount (%)
HDFC 12.0
ICICI 10.0
Visa 9.5
Axis 10.5
Standard Charted 8.5
City Bank 11.5
SBI 8.0
Assignment 5
Name of the project: ApolloFamilyCareHospital.java
When the Generate bill button is clicked the bill detail is displayed in a
JtextArea control.Rate for each ride is given below:
Ride Rate(Rs)
Joy Ride 1 80
Joy Ride 2 50
Joy Ride 3 90
Joy Ride 4 100
Joy Ride 5 150
A customer can select more than one or both the joy rides. The total is
calculated as the sum of one or both joy rides cost. A discount of 25% is
given on each ride if the child is below 12 years. Write code under the
action event of the Jbutton1 and Jbutton2 to achieve the above
functionality.
Assignment 7
Name of the project: GlamourGarments.java
Assignment 8
Name of the project: AlphaBuilders.java
Questions:
• What should be done so that only one of the radio buttons (Male and Female)
can be selected at a time?
• Write the code to do the following:
• Calculate and display the total wage in the corresponding label when the
“Calculate Wages” button is pressed.
• Clear the name and no. of days worked text fields.
• Close the application when stop button is pressed.
Assignment 9
Description of the project: Mr. Ram Kishore, the owner of the Kiddi Land
Enterprises, has asked his programmer saumya to develop the following GUI in
NetBeans.Mr. Ram accepts payment through three types of credit cards. The
offer is given according to the following scheme:
Type of Card Offer
Platinum 20% of amount
Gold 15% of amount
Silver 10% of amount
If the bill amount is more that Rs.25000/- , the customer gets an additional
offer of 5%.
Questions:
Questions:
• On the click of command button “Calculate”, textfield for “Entry Fees” should
display Entry fees per person*Number of people.
If “Water Park” CheckBox is selected, TextField for “WaterPark charges” should
display WaterPark charges per person*No. of people. TextField for “Total
Amount” should display sum of entry fees and water park charges for all the
people in the group
• Write java code to clear all TextBoxes on the click of “Clear” button.
• Write java code to close the application on the click of “Exit”.
Assignment 11
Name of the project: ClubMahindra.java
• Write the code to disable text boxes txtRate ,txtAmount, txtFacility when the
form is activated.
• Write the code for ClearBTN command button to lear all the text boxes.
• Write the code for CalcRateBTN to calculate rate of the room per day and
display it in the txtRate depending on the type of rooms selected by the
customer. Rate is calculated according to the following table:
ROOM TYPE: RATE PER DAY:
SINGLE 1500
DOUBLE 2800
DELUX 5000
Write code for CalcAmtBTN to calculate the total amount and display it in
txtAmount. The total amount is calculated by the first finding the cost of
facilities selected by the customer. Cost of facilities is calculated according to
the following table:
FACILITY: COST:
TOUR PACAKAGE 7000
GYM 2000
LAUNDRY 1000
Assignment 12
Name of the project: McDonald’sIndia.java
• Write the code for Calculate Rate button to calculate the rate of the pizza and
display it in RateTF depending on the type of pizza selected by the customer.
• Write the code for the AmtBTN to calculate the total amount and display it in
AmountTF. The total amount is calculated by first finding the cost of extra
toppings selected by the customer. Remember that each extra topping adds
the value with previous topping. Then add it to the rate and multiply the
resultant amount by the quantity ordered.
• Write the code for Clear button to clear all the textboxes a make default to
Regular Pizza type and Cheese as topping.
• Write the code for ExitBTN to exit the application.
Assignment 13
Name of the project: MaxewellPublicSchool.java
Questions:
• Write the code to calculate the basic salary, deductions, gross salary and net
salary based on the given specification.
Add 3000 to net salary if employee is working for more than 10 years.
Gross Salary = Basic Salary + DA + HRA
Net Salary = Gross Salary – deductions
• Write the code to clear all the TextFields, uncheck Checkboxes and set Non-
Teaching as the default category.
• Write the code to Exit the application.
Note: To operate the application, select the employee category and click the
calculate button.
Assignment 14
Name of Project: ClassConcept.java
Assignment 16
Name of the project: FactorialusingclassInheritance.java