Beruflich Dokumente
Kultur Dokumente
Submitted By
PULKIT GOEL
Class: XII-A
Page | 2
ASSIGNMENT-1
jTextField1.setText("");
jTextField2.setText("");
jTextField3.setText("");
jTextField4.setText("");
jTextField5.setText("");
System.exit(0);
------------------------------------------------------------------------------------
Page | 3
ASSIGNMENT-1
ASSIGNMENT-2
Question 2: - A Quick Fox Transport Co. wants to develop an application for
calculating amount based on distance and weight of goods.
The charges (Amount) to be calculated as per rates given below: -
Distance Weight Charges Per Km.
>=100 Kg Rs. 5/-
>=500 Km >=10 and <100 Kg Rs. 6/-
<10 Kg Rs. 7/-
<500 km >=100 Kg Rs. 8/-
<100 Kg Rs. 5/-
System.exit(0);
-----------------------------------------------------------------------------------
Page | 5
ASSIGNMENT-1
ASSIGNMENT-3
Question 3: - Develop a Java application to print a Pattern for given character
and steps, as per given screen shot.
jTextArea1.setText("");
jTextField1.setText("");
jTextField2.setText("");
----------------------------------------------------------------------------------------
Page | 7
ASSIGNMENT-1
ASSIGNMENT-4
Question 4: - Develop an application to compute the sum of digits for given
number.
ASSIGNMENT-5
Question 5: - Develop a Prime Number Generator Application which generates
Prime numbers for given range. Prime numbers are those numbers which are
divisible by one or itself only.
Page | 9
ASSIGNMENT-1
for(;lr<=up;lr++)
{
status=0;
for(i=2;i<=lr/2;i++)
{
if(lr%i==0)
{
status++;
break;
}
}
if(status==0)
{
jTextArea1.append(“\n”+lr);
}
}
CODE FOR “Exit” BUTTON-
System.exit(0);
-----------------------------------------------------------------------------------------------
Page | 10
ASSIGNMENT-1
Table Joining
Consider the following tables Course and Student
table.
Table name- Course
Question 1: - Display course name and student name from the above table by
using equi-join.
Page | 11
ASSIGNMENT-1
Page | 12
ASSIGNMENT-1
Page | 13
ASSIGNMENT-1
Question 5: -Right join
Page | 14