0% found this document useful (0 votes)
114 views76 pages

Ip - Practical - File SRI

The document is a certificate certifying that Aditya Chaudhary, a class 12 student, completed a dissertation on Java Programming under the guidance of teacher Monica Gupta. It fulfills the requirements for the academic session 2019-2020 and is a partial fulfillment for the CBSE AISSCE Examination 2020. The report has not been submitted for any other examination.

Uploaded by

Aditya Dhariwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
114 views76 pages

Ip - Practical - File SRI

The document is a certificate certifying that Aditya Chaudhary, a class 12 student, completed a dissertation on Java Programming under the guidance of teacher Monica Gupta. It fulfills the requirements for the academic session 2019-2020 and is a partial fulfillment for the CBSE AISSCE Examination 2020. The report has not been submitted for any other examination.

Uploaded by

Aditya Dhariwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 76

CERTIFICATE

This is to certify that the dissertation entitled. JAVA PROGRAMMING is a


work done by ADITYA CHAUDHARY of class XII-SCIENCE A during the
academic session 2019-2020 is a partial fulfillment of CBSE’S AISSCE
Examination 2020.

He has worked under my guidance and supervision and has fulfilled the
requirement of this file and has reached the requisite standard.

This report on a similar topic has not been submitted for any
examination and does not form a part of any other course undergone
by the candidate.

signature of teacher

( MS.Monica Gupta)

2|Page
ACKNOWLEDGEMENT
I ADITYA CHAUDHARY wish to express my gratitude to all those who
helped me and enabled me to complete my informatics practices
project. I express sincere thanks to our respected teacher

MS. Monica Gupta for her valuable suggestion, informative &


illuminative guidance.

Her unflagging patient, creativity and immense knowledge that she


shared with us. Have proved highly beneficial to us and have made our
project possible and successful.

Through this column, it would be my utmost pleasure to express warm


thanks to her encouragement, co-operation and consent.

3|Page
INDEX
TOPIC DATE OF TEACHER’S
SNO PRACTICAL SIGNATURE

Write an application for a simple


1. Calculator to implement addition,
subtraction, multiplication and
division operations. The text boxes get
cleared when ‘Clear’ button is clicked.

Write an application for Quick Fox Transport


2. Co., who wants to develop an application for
calculating amount based on distance and
weight of goods .The charges (Amount) to be
calculated as per rates

Write an application to calculate percentage and


3. grade as a programmer requires developing a
student record application. The school offers two
different streams- medical and non-medical, with
different grading criteria.

Write the code to disable the ‘txtPercentage’


and the ‘txtGrade’ text fields.

Write the code for the Clear button to clear all


the text fields.

Write the code for calculating percentage


button to calculate the percentage to display in
text
field ‘txtPercentage’, after finding the total marks
of first term and second term. (Assuming
that both marks are out of 100.)

Write the code for calculating Grade button to


calculate the grade to display in text field
‘txtGrade’, depending on the stream selected
according to the criteria in the following table:

4|Page
Write an application for Happy Shopping- A retail
4. chain involved in sales of Readymade garments.
The happy Shopping offers discount to its
members holding Platinum, Gold and Silver card.
10%
discount is given to Platinum card, 8% to Gold
Card and 5% to Silver Card holders on sales
amount.

Write an application for The Entertainment


5. Paradise- A theater in Delhi who wants to develop
a
computerized Booking System. The theater offers
different types of seats.

a). Write an application to accept a string and


6. perform following functions:

Find length of the string.

Find number of words in it.

Find number of vowels in it.

Check whether the string is palindrome or not


All the outputs have to be displayed using
JOptionPane.
B). Write an application to concatenate two strings

write an application to check whether the given


7. user id and password is correct or not .

Write an application to print a pattern for


8. given character and steps.

Write an application to compute the sum of


9. digits for given number.

Write an application to compute the factorial and


1O. checking prime for a given number, using custom
methods. A method named factorial() and prime()
along with suitable parameters are called when
Get Factorial and Check Prime button is pressed
respectively.

5|Page
Write an application to show the entered text
11. in the color as specified by the user.

Write an e-learning application with images


12. and text information

HTML/JAVA CONNECTIVITY

S.N0. TOPICS DATE OF TEACHER’S

PRACTICALS SIGNATURE

1. FORMATION OF
WEBSITE USING HTML

2. JAVA CONNECTIVITY

QUESTION

6|Page
Q1

Write an application for a simple Calculator to


implement addition, subtraction, multiplication and
division operations. The text boxes get cleared when
‘Clear’ button is clicked.

THE DESIGN VIEW:

SOURCE CODE:
1 .CLEAR BUTTON:

7|Page
2.EXIT BUTTON:

3.ADDITION BUTTON:

4.SUBSTRACTION BUTTON:

5.MULTIPLICATION BUTTON:

6.DIVISION BUTTON:

8|Page
OUTPUT:
1.ADDITION BUTTON:

2.MULTIPLICATION BUTTON:

9|Page
3.DIVISION BUTTON:

4.SUBSTRACTION BUTTON:

10 | P a g e
Q2

Write an application for Quick Fox Transport Co., who 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


Greater than or Greater than or Rs.5/-
equal to 500 Km equal to 100 kg.
Less than 100 kg. Rs.7/-
Less than 500 Km Greater than or Rs.8/-
equal to 100 Kg.
Less than 100 Kg. Rs.5/-

THE DESIGN VIEW:

11 | P a g e
SORCE CODE:
1.CALCULATE BUTTON:

12 | P a g e
2.CLEAR BUTTON:

3.EXIT BUTTON:

OUTPUT:
1.CALCULATE BUTTON:

13 | P a g e
2.CALCULATE BUTTON

14 | P a g e
Q3

Write an application to calculate percentage and grade as a


programmer requires developing a student record
application. The school offers two different streams-
medical and non-medical, with different grading criteria.
 Write the code to disable the ‘txtPercentage’ and the
‘txtGrade’ text fields.
 Write the code for the Clear button to clear all the text
fields.
 Write the code for calculating percentage button to
calculate the percentage to display in text field
‘txtPercentage’, after finding the total marks of first
term and second term. (Assuming that both marks are
out of 100.)
 Write the code for calculating Grade button to calculate
the grade to display in text field ‘txtGrade’, depending
on the stream selected according to the criteria in the
following table:

STREAM PERCENTAGE GRADE


Greater than or equal A
MEDICAL to 80
Between 60 and 80 B
Less than or equal to C
60
Greater than or equal A
NON- to 75
MEDICAL
Between 50 and 75 B
Less than or equal to C
50

15 | P a g e
THE DESIGN VIEW:

SOURCE CODE:
1.CLEAR BUTTON:

16 | P a g e
2.CALCULATE BUUTON:

3.EXIT BUTTON:

17 | P a g e
CODE TO DISABLE “TEXTPERCENTAGE” AND THE “TEXTGRADE”
TEXT FIELDS.

OUTPUT:
1.CALCULATE BUTTON:

18 | P a g e
Q4

Write an application for Happy Shopping- A retail chain


involved in sales of Readymade garments. The happy Shopping
offers discount to its members holding Platinum, Gold and
Silver card. 10% discount is given
to Platinum card, 8% to Gold Card and 5% to Silver Card
holders on sales amount.

THE DESIGN VIEW:

19 | P a g e
SORCE CODE:
1.CALCULATE BUTTON:

2.CLEAR BUTTON:

3.EXIT BUTTON:

20 | P a g e
OUTPUT:
1.CALCULATE BUTTON:

21 | P a g e
Q5

Write an application for The Entertainment Paradise- A


theater in Delhi who wants to develop a computerized
Booking System. The theater offers different types of seats.
The Ticket rates are:
Types Of Seats Rate (Per Seat)
Stalls Rs. 625/-
Circle Rs.750/-
Upper Class Rs.850/-
Box Rs.1000/-
A discount is given 10% of total amount if tickets are
purchased on Cash. In case of credit card, 5% discount is
given.

THE DESIGN VIEW:

22 | P a g e
SOURCE CODE:

1.CALCULATE BUTTON:

2.EXIT BUTTON:

23 | P a g e
3.CLEAR BUTTON:

OUTPUT:

24 | P a g e
Q6

(A) Write an application to accept a string and perform


following functions:
 Find length of the string.
 Find number of words in it.
 Find number of vowels in it.
 Check whether the string is palindrome or not
All the outputs have to be displayed using
JOptionPane.

THE DESIGN VIEW:

SORCE CODE:
1.FIND LENGTH BUTTON:

25 | P a g e
2.FIND NUMBER OF WORDS BUTTON:

3.FIND NUMBER OF VOWELS BUTTON:

4.CHECK PALINDROME BUTTON:

26 | P a g e
5.CLEAR BUTTON:

6.EXIT BUTTON:

OUTPUT:
1.FIND LENGTH BUTTON:

27 | P a g e
2.FIND NUMBERS OF WORDS BUTTON:

3.FIND NUMBER OF VOWELS BUTTON:

28 | P a g e
4.CHECK PALINDROME BUTTON:

29 | P a g e
Q6
B
B) Write an application to concatenate two strings

THE DESIGN VIEW:

SOURCE CODE:
1.CLEAR BUTTON:

2.SHOW BUTTON:

30 | P a g e
3.EXIT BUTTON:

OUTPUT:
1.SHOW BUTTON:

31 | P a g e
Q7

Write an application to check whether the given user


id and password is correct or not.

THE DESIGN VIEW:

OUTPUT:
1.REFRESH BUTTON:

32 | P a g e
2.LOGIN BUTTON:

3.EXIT BUTTON:

4.show password button:

33 | P a g e
OUTPUT:
1.login button;

34 | P a g e
2.show password button:

35 | P a g e
Q8

Write an e-learning application with images and text


information.

THE DESGN VIEW:

SOURCE CODE:
1.MOUSE BUTTON:

36 | P a g e
2.KEYBOARD BUTTON:

3.MONITOR BUTTON:

4.CPU BUTTON:

5.CLEAR BUTTON:

6.EXIT BUTTON:

37 | P a g e
OUTPUT:

1.MOUSE BUTTON:

2.KEYBOARD BUTTON:

38 | P a g e
3.MONITOR BUTTON:

4.CPU BUTTON:

39 | P a g e
Q9

Write an application to print a pattern for given


character and steps.

THE DESIGN VIEW:

SOURCE CODE:
1.CLEAR BUTTON:

40 | P a g e
2.GENERATE BUTTON:

3.EXIT BUTTON:

OUTPUT:

41 | P a g e
Q10

Write an application to compute the sum of digits for


given number.

THE DESIGN VIEW:

Source code:
1.show button:

2.clear button:

42 | P a g e
3.exit button:

Output:
1.show button:

43 | P a g e
Q11
Q11
Q11 Q11
Q11
Write an application to compute the factorial and
checking prime for a given number, using custom
methods. A method named factorial() and prime()
along with suitable parameters are called when Get
Factorial and Check Prime button is pressed
respectively.

THE DESIGN VIEW:

SOURCE CODE
CUSTOM METHODS:
1.FACTORIAL()METHOD:

44 | P a g e
2.PRIME()METHOD:

1.FACTORIAL BUTTON:

2.PRIME NUMBER BUTTON:

3.CLEAR BUTTON:

45 | P a g e
4.EXIT BUTTON:

OUTPUT
1.FACTORIAL BUTTON:

2.PRIME NUMBER BUTTON:

46 | P a g e
Q12

Write an application to show the entered text in the


color as specified by the user.

THE DESIGN VIEW:

SOURCE CODE
1.CLEAR BUTTON:

47 | P a g e
2.SHOW BUTTON:

3.EXIT BUTTON:

48 | P a g e
OUTPUT

49 | P a g e
50 | P a g e
Design view-

Database of login
Form-
Table client in database(login):

51 | P a g e
Coding of login
Form-
Import statement:

Login button:

52 | P a g e
Exit button:

Output-

On click of login button:

 If the username or password is incorrect

53 | P a g e
 If the username or password is correct

On click of exit button the form will be closed.

54 | P a g e
55 | P a g e
HTML WEBSITE-

CODING-

56 | P a g e
57 | P a g e
58 | P a g e
QUESTION: CONSIDER A TABLE FINANCE WITH THE FOLLOWING DATATYPE
AND DATA:
STRUCTURE OF TABLE FINANCE:

FIELD NAME DATA TYPE CONSTRAINTS


DESCRIPTION
ACCNO NUMBER(4) PRIMARY KEY
ACCOUNT NUMBER
BNAME VARCHAR(15) NOT NULL BANK NAME
CNAME VARCHAR(25) NOT NULL CUSTOMER NAME
LAMOUNT NUMBER(8,2) LOAN AMOUNT
INSTALMENTS NUMBER(3) TOTAL NUMBER OF
INSTALMENTS
IRATE NUMBER(5,2) DEFAULT 8.0 INTREST RATE
ISDATE DATE INTREST STARTING DATE

DATA IN TABLE FINANCE

ACCNO BNAME CNAME LAMOUNT INSTALMENTS IRATE ISDATE


1 SBI VIKASH RAI 750000 142 12.00 2011-17-19
2 ICICI MILKHA 158000 252 10.00 2010-03-22
SINGH
3 PNB BINOD GOEL 530000 140 NULL 2012-03-08
4 SBI V.N GILL 850000 165 10.00 2011-06-12
5 OBC P.N SINHA 120000 210 12.50 2011-01-03
6 ICICI K.P MATHUR 170000 154 12.50 2009-06-05
7 HDFC J.N MITTAL 150000 190 NULL 2010-03-05

59 | P a g e
SQL QUERIES-
CREATE TABLE/INSERT INTO:
1. CREATE TABLE FINANCE

2. STRUCTURE OF TABLE FINANCE

60 | P a g e
3. INSERT RECORDS

SIMPLE SELECT QUERY QUESTIONS:


4. DISPLAY THE DETAILS OF ALL THE ROWS FROM TABLE:

61 | P a g e
5. DISPLAY THE ROWS CONTAINING accno, Bname, Cname,
and LAmount columns.

CONDITIONAL SELECT QUERY USING WHERE


CLAUSE:
6. DISPLAY THE DETAILS OF ALL THE FINANCE RECORDS
WHOSE INASTALMENT IS LESS THAN 200.

7. DISPLAY accno,Cname AND LAmount OF ALL THE


RECORDS WHICH STARTED BEFORE ‘2011-01-01’.

62 | P a g e
8. DISPLAY ACCNO,CNAME AND LAMOUNT OF ALL THE REOCRDS.

SELECT QUERY USING NULL:


9. DISPLAY THE DETAILS OF ALL THE LOAN WHOSE RATE OF
INTREST IS NULL.

10. DISPLAY THE DETAILS OF ALL THE LOAN WHOSE


RATEOFINTRESTISNOTNUL.L.

63 | P a g e
SELECT QUERY USING DISTINCT CLAUSE:
11.DISPLAY THE NAME OF BANK WHO FINANCE VARIOUS LOANS
FROM THE TABLE FINANCE

12.DISPLAY THE DIFFERENT INTREST RATE THAT BANKS ARE


CHARGING FOR VARIOUS LOANS EXCLUDING NULL.

SELECT QUERY USING LOCAL OPERATORS(AND,OR,NOT):


13.DISPLAY THE DETAILS OF ALL THE FINANCE AMOUNT WHICH
STARTS AFTER 2010-12-31 AND FOR WHICH THE NUMBER
OFINSTALMENT IS MORE THAN 150.

64 | P a g e
14.DISPLAY THE CNAME AND LAMOUNT FOR ALL THOSE RECORD
FOR WHICH EITHER INSTALMENTS ARE LESS THAN 150 OR BANK
NAME IS SBI.

15.DISPLAY THE CNAME AND LAMOUNT FOR ALL THOSE LOANS


FOR WHICH THE LOAN AMOUNT IS EITHER LESS THAN 1200000
OR IRATE IS MORE THAN 11.50.

16.DISPLAY THE DETAILS OF ALL LOANS WHICH ARE FINANCED IN


THE YEAR 2009.

65 | P a g e
17.DISPLAY THE DETAILS OF ALL LOANS WHOSE LAMOUNT IS IN
THE RANGE 800000 TO 1500000.

18.DISPLAY THE DETAILS OF ALL LOANS WHOSE RATE OF INTREST


IS IN THE RANGE 11.00 TO 12.00.

SELECT QUERY USING IN OPERATOR:


19.DISPLAY THE CUST_NAME AND LOAN_AMOUNT FOR ALL THE
LOANS FOR WHICH THE NUMBER OF INSTALMENTS ARE
140,165,190.

66 | P a g e
SELECT QUERY USING BETWEEN OPERATOR:
20.DISPLAY THE DETAILS OF ALL THE AMOUNT WHOSE LAMOUNT
IS IN THE RANGE 800000 TO 1500000.

21.DISPLAY THE DETAILS OF ALL THE LOANS WHOSE RATE OF


INTREST IS IN THE RANGE 10.00 TO 12.00.

SELECT QUERY USING LIKE OPERATOR:


22.DISPLAY THE ACCNO,AND LAMOUNT FOR ALL THE LOANS FOR
WHICH THE CUST_NAMES ENDS WITH SINGH.

67 | P a g e
23.DISPLAY THE ACCNO,CNAME, AND LAMOUNT FOR ALL THE
LOANS FOR WHICH THE CNAME ENDS WITH ‘A’.

24. DISPLAY THE ACCNO,CNAME, AND LAMOUNT FOR ALL THE


LOANS FOR WHICH THE CNAME CONTAINS ‘T’.

25. DISPLAY THE ACCNO,CNAME, AND LAMOUNT FOR ALL THE


LOANS FOR WHICH THE CNAME DOES NOT CONTAIN ‘N’.

26. DISPLAY THE ACCNO,CNAME, AND LAMOUNT FOR ALL THE


LOANS FOR WHICH THE CNAME CONTAINS ‘A’ AS SECOND LAST
CHARACTER.

68 | P a g e
SELECT QUERY USING ORDER BY CLAUSE:
27.DISPLAY THE DETAILS OF ALL THE LOAN IN ASCENDING ORDER
OF THERE LAMOUNT.

28. DISPLAY THE DETAILS OF ALL THE LOAN IN DESCENDING


ORDER OF THERE ISDATE.

29.DISPLAY THE DETAILS OF ALL THE LOAN IN ASCENDING ORDER


OF THERE LOAN_AMOUNT AND WITH IN LOAN_AMOUNT IN THE
DESCENDING ORDER OF THERE START_DATE.

69 | P a g e
SELECT QUERY USING UPDATE,DELETE,ALTER TABLE:
30.PUT THE INTREST RATE 11.50 FOR ALL THE LOANS WHOSE
INTREST RATE IS NULL.

31.INCREASE THE INTREST RATE BY 0.2 FOR ALL THOSE LOANS


FOR WHICH THE LOAN AMOUNT IS MORE THAN 1000000.

32.DELETE THE RECORD OF ALL THOSE LOANS WHOSE START


DATE IS BEFORE 2007.

70 | P a g e
33.DELETE THE RECORD OF ALL THOSE LOANS OF ‘K.P.SINGH’.

34.ADD ANOTHER COLUMN CATEGORY OF TYPE CHAR(1) IN


FINANCE TABLE.

SELECT QUERY USING AGGREGATE FUNCTION:


35.TO FIND THE HIGHEST LOAN AMOUNT WHOSE INTREST RATE
IS 12.70.

71 | P a g e
36.TO FIND CUSTOMER NAME AND MINIMUM LOAN AMOUNT
WHICH STARTS IN YEAR 2011.

37.TO FIND BANK NAME WHO HAS HIGHEST INTREST RATE.

38.TO COUNT TOTAL NUMBER OF CUSTOMERS WHOSE INTREST


RATE IS NULL.

72 | P a g e
SELECT QUERY USING GROUP BY AND HAVING CLAUSE:
40.WRITE A QUERY TO BANK WISE DISPLAY TOTAL FINANCE
AMOUNT.

41.write a query to find the maximum loan amount of each bank


that has a maximum loan amount more than 1000000.

73 | P a g e
JOIN OF TWO TABLES
TABLE:EMPLOYEE

TABLE:DEPARTMENT

74 | P a g e
1.DISPLAY THE NAME,SALARY OF ALL THE EMPLOYEES WHO WORK IN
SALES DEPARTMENT.

2.DISPLAY THE NAME,DEPARTMENT NAME OF ALL THE EMPLOYEES.

3.DISPLAY THE NAME OF ALL EMPLOYEES WHOSE SALARY IS OUT OF


THE SPECIFIED RANGE FOR THE CORRESPONDING DEPARTMENT.

4.DISPLAY THE NAME OF THE DEPARTMENT AND THE NAME OF THE


CORRESPONDING HOD FOR ALL THE DEPARTMENT.

75 | P a g e
76 | P a g e
77 | P a g e

You might also like