Practical File Xii It
Practical File Xii It
ON
INFORMATION TECHNOLOGY
CODE : 802
CLASS :XII
SESSION : 2021-22
SUBMITTED TO:
STUDENT NAME : ...... Ms. Suneeta Jena
ROLL NO. : ........
CLASS & SECTION : ...........
SUBMITTED BY:
INDEX
Sr. No. NAME OF PRACTICAL
1 Consider the following Employee table:
Table Name: Employee
The primary key of this table is Employee_ID and Manager_ID is a foreign key that references
Employee_ID.
Write SQL commands for the following:
(a) Create the above table.
(b) Insert values as shown above.
(c) Delete the Employee having Employee_ID 1217.
(d) Update the salary of “Amyra” to 40000.
(e) Alter the table Employee so that NULL values are not allowed for Age column.
(f) Write a query to display names and salaries of those employees whose salary are
greater than 20000.
(g) Write a query to display details of employees who are not getting any bonus.
(h) Write a query to display the names of employees whose name contains “a” as the last
alphabet.
(i) Write a query to display the name and Job title of those employees whose Manager_ID is
1201.
(j) Write a query to display the name and Job title of those employees whose Manager is
“Amyra”.
(k) Write a query to display the name and Job title of those employees aged between 26
years and 30 years (both inclusive)
2 A Railway company uses machines to sell tickets. The machine details and daily sales
information are recorded in two tables:
Table Name: Machine
5 Write a program in Java to print the square of every alternate number of an array.
6 Write a program in Java to create class Triangle with the data members base, height, area and
color. The members base, height, area are of type double and color is of type string. Write
getter and setter methods for base, height and color, and write method to compute_area ().
Create two object of class Triangle, compute their area, and compare their area and color. If
area and color both are same for the objects then display "Matching Triangles" otherwise
display "Non matching Triangles".
7 Write a program in Java to enable user to handle divide by zero exception.
8 Write a program in Java to retrieve data from the MySQL table book in the bookstore
database.
11 Write a Java Program to replace the spaces of a string with a specific character.
17 Write a program to illustrate creation of threads using runnable class.(start method start each
of the newly created thread. Inside the run method there is sleep() for suspend the thread for
500 milliseconds).