Sie sind auf Seite 1von 23

Assignment 1

Name of the project: Student’sMarksheet.java

Description of the project: Create a Java desktop application to


perform the following calculations:
• Calculation of total and Average marks
Total=English+maths+physics+chemistry+I.P
Average=total/5

• Displaying the Distinction/Average marks based on the total marks


scored.

• Variable Controls Are As follows:

CONTROL NAME CHANGED VARIABLE NAME


jTextField1 txtEng
jTextField2 txtPhy
jTextField3 txtChem
jTextField4 txtIP
jTextField5 txtMaths
jTextField6 txtTot
jTextField7 txtAvg
jTextField8 txtResult
jTextField9 txtGrade
jButton1 ComputeBTN
jButton2 ExitBTN

• 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

Name of the project: ElectronicAppliances.java

The categories will be implemented in JRadioButton controls.


 The discount will be calculated as follows:
COST DISCOUNT (%)
<=1000 5
Otherwise 10

 The extra discount will be calculated as follows:


CATEGORY DISCOUNT
(%)
Electrical Appliance 3
Electrical Gadget 2
Stationary 1
• Calculate the total discount as: discount on cost+discount on category
• Calculate the discount amount as: cost*discount

Variable control names are as follows:-

CONTROL NAME CHANGED VARIABLE NAME


jTextField1 txtCost
jTextField2 txtDisc
jButtonGroup1 ButtonGroup1
jRadioButton1 ApplianceRB
jRadioButton2 GadgetRB
jRadioButton3 StationaryRB
jButton1 DiscBTN
jButton2 ExitBTN

• Using a JButton’s (Compute Discount) click event handler, display the


amount in a JTextField(txtDisc) control.
• Write the code for Exit button(ExitBTN) to exit the application.
Assignment 3
Name of the project: SalesIncentives.java

Description of the project: Create a java desktop application to find the


Incentive(%) of Sales for a Sales person on the basis of following feedbacks:
Feedback Incentive (%)
Maximum Sales 10
Excellent Customer Feedback 8
Minimum Count of Customer 5

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.

Variable control names are as follows:

CONTROL NAME CHANGED VARIABLE NAME


jTextField1 txtSales
jTextField2 txtInc
jButtonGroup1
jCheckBox1 Chk1
jCheckBox2 Chk2
jCheckBox3 Chk3
jButton1 IncBTN
jButton2 ExitBTN

• Using a JButton’s (Compute Inceptives) click event handler, display the


total Incentives in a JTextField control.
• Write the code for Exit button to close the application.
Assignment 4
Name of the project: BigBazarShipment.java

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

Variable control names are as follows:

CONTROL NAME CHANGED VARIABLE NAME


jTextField1 txtAmount
jTextField2 txtDisc
jTextField3 txtNet
jRadioButton1 optHDFC
jRadioButton2 optICICI
jRadioButton3 optVisa
jRadioButton4 optAxis
jRadioButton5 optSC
jRadioButton6 optCity
jRadioButton7 optSBI
jButton1 DiscBTN
jButton2 ClearBTN
jButton3 ExitBTN
jButtonGroup1 ButtonGroup1
• Write the code for Discount button to compute discount amount and
net amount
• Write the code for ClearBTN command button to clear all the text boxes
and set the default choice in the radio button as SBI.
• Write the code for Exit button to close the application.

Assignment 5
Name of the project: ApolloFamilyCareHospital.java

Description of the project: The hospital has computerized its billing.

Variable control names are as follows: -

CONTROL NAME CHANGED VARIABLE NAME


jTextField1 txtPNo
jTextField2 txtPName
jTextField3 txtDays
jTextField4 txtDCharge
jTextField5 txtOTCharge
jTextField6 txtMedicine
jTextField7 txtMeal
jTextField8 txtAdvance
jTextField9 txtSTotal
jTextField10 txtStay
jTextField11 txtTax
jTextField12 txtAmount
jRadioButton1 optD
jRadioButton2 optP
jRadioButton3 Opts
jRadioButton4 optG
jButtonGroup1 JButtonGroup1
jButton1 BillBTN
jButton2 ClearBTN
jButton3 ExitBTN
Questions:
• When the form loads text boxes for subtotal(txtSTotal), Tax(TxtTax),
Amount to pay (txtAmount) and total stay charges (txtStay) are disabled. Also
Make the default category of service as General.
• When the user clicks clear button , Patient Number and Patient Name
should be set as blank, other text boxes should be set to zero. Also make the
default category of service as General.
• When the command button with caption “Calculate Bill” (BillBTN) is
clicked, subtotal, Tax (12% of subtotal), Total amount to be paid by the patient
are computed and displayed. The criterion for calculation of subtotal charges is
as:
(18)
Category of patient Stay Charges per day
Deluxe 4000.00
Private 2000.00
Semi Private 1000.00
General 400.00

• Total stay charges will be calculated as no of days * stay charges.


• Subtotal is calculated by adding total stay charges, Doctor charge, OT
charge, Medicine and Patient Meal.
• Tax is levied at 12% of subtotal.
• Advance deposit is entered by the user.
• Amount to pay = (Sub Total+ Tax)-Advance Deposit by the Patient.
• Write the code for Exit button to close the application.
Assignment 6
Name of the project: AmusementPark.java

Description of the project: Amusement Park is a children park uses the


interface to generate a bill for its customers.

Variable control names are as follows:-

CONTROL NAME CHANGED VARIABLE NAME


jTextField1 txtName
jTextField2 txtAge
jCheckBox1 Chkjr1
jCheckBox2 Chkjr2
jCheckBox3 Chkjr3
jCheckBox4 Chkjr4
jCheckBox5 Chkjr5
jTextArea1 txtRes
jButton1 BillBTN
jButton2 ExitBTN

 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

Mode Of Payment Discount


Cash 8%
Cheque 7%
Credit Card Nil
Description of the project: Glamour garments has developed a GUI
application for their company. The company accepts 3 modes cheques, cash
and credit cards. The discount is given as per mode of payment is as follows:
If bill amount is more than 15000 then customer gets additional discount of
10% on bill amt.

List of controls of the form is as follows:

CONTROL TYPE CHANGED VARIABLE NAME


jTextField1 txtName
jTextField2 txtDisc
jTextField3 txtNetAmount
jTextField4 txtBillAmount
jComboBox1 cmbMode
jButton1 btnCalcDisc
jButton2 btnClear
jButton3 btnCalcNetAmt
Questions:

• Write code to make the textfields for Discount(txtDisc) and net


amount(txtNetAmount) uneditable.
• Write code to do the following:
• When “Calculate Discount” button is clicked the discount should be
calculated as per the given criteria and it should be displayed in the discount
textfield. “Calculate net amount” button(btnCalcNetAmt) should also be
enabled.
• When “Calculate Net Amount” button is clicked the net amount should
be calculated and it should be displayed in the net amount text field.

Assignment 8
Name of the project: AlphaBuilders.java

Description of the project: Ruchika a programmer at Alpha Builders. To


calculate wages to be paid to labourers. To develop following GUI in NetBeans.
Male, Female membership respectively paid Rs. 140 per day and Rs.160 per
day. Skilled labourers are paid extra Rs.50 per day.

Variable control names are as follows:

CONTROL NAME CHANGED VARIABLE NAME


jTextField1 NameTF
jTextField2 DaysTF
jTextField3 WagesTF
jRadioButton1 FemaleRB
jRadioButton2 MaleRB
jButtonGroup1 GenderBG
jCheckBox1 SkilledCB
jButton1 CalcWageBTN
jButton2 ClearBTN
jButton3 StopBTN

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

Name of the project: KiddiLandEnterprises.java

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:

• To assign additional offer as zero(txtAddOffer) and Net Amount as


zero(txtNetAmt). Also set them as uneditable.
• [When “Calculate Offer”(btnCalcOffer) is clicked]
• To calculate discount as per the given criteria and display the same in Offer
TextField.
To assign Additional offer(txtAddOffer) as 5% of amount(txtBillAmt) as per the
above condition.
To enable “Calculate Net Amount”(btnCalcNetAmt) button.
• [When “Calculate Net Amount” button is clicked].
To calculate Net Amount as[TotalCost(txtBillAmt) – Offer(txtOffer) - Additional
offer(txtAddOffer)]
To display the Net Amount in Net Amount TextField.

Variable control names are as follows:

CONTROL NAME CHANGED VARIABLE NAME


jTextField1 txtName
jTextField2 txtBillAmt
jTextField3 txtOffer
jTextField4 txtAddOffer
jRadioButton2 RBGold
jRadioButton3 RBSilver
jButton1 btnCalcOffer
jButton2 btnCalcNetAmt
jButton3 btnExit
Assignment 10
Name of the project: Recreationpark.java

Description of the project: Mr. Rangaswami works at Recreation Parkas


system analyst. He created the following GUI application. When a group arise
in recreation park the number of people in group whether they want to enjoy
to water park or not. Entry fee is Rs.500 per person the person can choose to
play at water park by selecting the checkbox. Rides at water park will cost extra
Rs. 250 per person.

Variable Controls names are as follows:

CONTROL NAME CHANGED VARIABLE NAME


jTextField1 NOP
jTextField2 EF
jTextField3 WPC
jTextField4 TA
jCheckBox1 WaterParkCB
jButton1 ClearBTN
jButton2 CalcBTN
jButton3 ExitBTN

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

Description of the project: Club Mahindra in Manali plans to go for


computerized in order to meet the workload in tourist season. Three Types of
rooms are available.

Variable Controls names are as follows:

CONTROL NAME: CHANGED VARIABLE NAME:


jTextField1 txtName
jTextField2 txtDays
jTextField3 txtFacilities
jTextField4 txtAmount
jTextField5 txtRate
jRadioButton1 OptSingle
jRadioButton2 OptDouble
jRadioButton3 OptDelux
jCheckBox1 chkTour
jCheckBox2 chkGym
jCheckBox3 chkLaundry
jButtonGroup1 RoomTypeBG
jButton1 CalcRateBTN
jButton2 CalcAmtBTN
jButton3 ClearBTN
Questions:

• 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

Description of the project: McDonald’s India has computerized its billing


the outlet offers two different types of pizzas Regular and Pan pizzas. The price
of Regular is Rs. 120 and of Pan Rs. 160. The User can choose to have three
different types of extra toppings he wants. The extra topping cost are:
TOPPING COST(Rs)
CHEESE 50
CAPSICUM 35
PEPPERONI 30

Variable Controls names are as follows:

CONTROL NAME CHANGED VARIABLE NAME


jTextField1 NameTF
jTextField2 QtyTF
jTextField3 RateTF
jTextField4 ToppingTF
jTextField5 AmountTF
jButtonGroup1 PizzaTypeBG
jRadioButton1 RegularRB
jRadioButton2 PanRB
jCheckBox1 CapCB
jCheckBox2 CheeseCB
jCheckBox3 PepCB
jButton1 RateBTN
jButton2 AmtBTN
jButton3 ExitBTN
jButton4 ClearBTN
Questions:

• 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

Description of the project: Maxewell Public School wants to computerized


the employee salary section. The school has two categories of employees:
Teaching and Non-Teaching. The teaching employees are further categories
into PGTs, TGTs and PRTs having different basic salary. The school gives
addition pay of 3000 for employees who are working more than 10 years.
Employee Basic Salary DA HRA Deductions
Type (% of Basic (% of Basic (% of Basic (% of Basic
Sal) Sal) Sal) Sal)
Non- 12500 31 30 12
Teaching
PGT 14500 30 30 12
TGT 12500 21 30 12
PRT 11500 20 25 12

Variable Controls names are as follows:

CONTROL NAME CHANGED VARIABLE NAME


jTextField1 txtBasic
jTextField2 txtDed
jTextField3 txtGross
jTextField4 txtNet
jButtonGroup1 JButtonGroup1
jRadioButton1 optNon
jRadioButton2 optPgt
jRadioButton3 optTgt
jRadioButton4 optPrt
jCheckBox1 chk10Year
jButton1 CalcBTN
jButton2 ClearBTN
jButton3 ExitBTN

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

Description of the project: Create a java Desktop Application to


demonstrate class concepts. Using class Cube, develop the application to find
the volume of a cube.

Variable Controls are as follows: -

CONTROL NAME CHANGED VARIABLE NAME


jTextField1 txtLength
jTextField2 txtBreadth
jTextField3 txtHeight
jTextField4 txtVolume
jButton1 BTNVolume
jButton2 BTNExit
Assignment 15
Name of the project: ConstructorinaClass.java
Description of the project: Create a Java Desktop Application to
Demonstrate constructor object for the following data members of
Teacher Class:
private String name;
private String address;
private String desig;
private double salary;
private double da;
private double hra;
private double gross;
The program should initialize the data members through a constructor
and using a Display method of a Teacher class, show the details in a
JTextArea control.
Variable Controls are as follows:
CONTROL NAME CHANGED VARIABLE NAME
Button BTNTeacher
Button BTNExit

Assignment 16
Name of the project: FactorialusingclassInheritance.java

Description of the project: Demonstrate the inheritance concepts in


Java using NetBeans IDE. Calculate the factorial of a number using
childClass and baseClass.
Variable Controls names are as follows:

CONTROL NAME CHANGED VARIABLE NAME


jTextField1 txtFactorial
jTextField2 txtNum
jButton1 BTNFactorial
jButton2 BTNExit
Assignment 17
Name of the project: InsertingDatabaseRecords.java

Description of the project: Create an application to insert new records into


MySQL TEACHER table contains following structure:
Field Name MySQL Data Type Length
TNO Char 4
TNAME Varchar 25
TADDRESS Float 25
SALARY Float
DEPT_NO Char 4
DOJ Date

Variable Controls are as Follows:

CONTROL NAME CHANGED VARIABLE NAME


jTextField1 txtTNo
jTextField2 txtTName
jTextField3 txtTAddress
jTextField4 txtTSalary
jTextField5 txtTDeptno
jTextField6 txtTDOJ
jButton1 BTNFirst
jButton2 BTNNext
jButton3 BTNPrev
jButton4 BTNLast
jButton5 BTNSave
jButton6 BTNClear
jButton7 BTNExit

Das könnte Ihnen auch gefallen