PRACTICAL FILE QUESTION 2025-26
INFORMATION TECHNOLOGY (CLASS XII)
1. Write a Java program to check whether a number is even or
odd using if–else.
2. Write a Java program to input three numbers and display the
greatest using if–else if and else
3. Write a Java program to check whether a given year is a leap
year.
4. Write a program to input marks and display grade as per
percentage:
90 and above → A+
75–89 → A
60–74 → B
45–59 → C
Below 45 → Fail
5. Write a Java program to calculate electricity bill as per the
following slab:
Up to 100 units → ₹5/unit
101–200 units → ₹7/unit
Above 200 units → ₹10/unit
Add ₹50 as fixed charge to total amount.
6. Write a Java program using for loop to display numbers from
1 to 10.
7. Write a Java program to find the factorial of a given number
using for loop.
8. Write a program to display the multiplication table of a
number entered by user.
9. Write a program to input a number and find the sum of its
digits using while loop.
10. Write a program to display first N terms of the
Fibonacci series using for loop.
11. Write a program to input 10 numbers into an array and
display their sum and average.
12. Write a program to find the largest and smallest number
from an array.
13. Write a program to search for an element in an array
using linear search.
14. Write a program to sort array elements in ascending
order.
15. Write a program to add two 3×3 matrices and display
the result.
16. Write a Java program to input a string and display it in
reverse order.
17. Write a program to check whether a string is
palindrome or not.
18. Write a program to count number of vowels and
consonants in a given string.
19. Write a program to convert lowercase letters to
uppercase and vice versa.
20. Write a Java program to count the total number of
words in a given sentence.
21. Create a class Student with attributes name,
rollno, and marks in 3 subjects.
Calculate total, average, and grade using methods.
22. Define a class Employee with data members
name, empId, basic salary.
Calculate DA = 20%, HRA = 10%, and net salary =
basic + DA + HRA.
23. Create a class Area with methods to calculate the
area of a circle, rectangle, and triangle.
24. Create a class Bank Account with data members
account number, name, and balance.
Include methods for deposit, withdraw, and display
balance.
a. Write a Java program to create two threads:
i. Thread 1 → print numbers 1 to 5
ii. Thread 2 → print numbers 6 to 10
Index for SQL
Table: Employee
No Name Salar Zone Ag Grade Dept
y e
1 Mukul 30000 West 28 A 10
2 Kritika 35000 Centre 30 A 10
3 Naveen 32000 West 40 20
4 Uday 38000 North 38 C 30
5 Nupur 32000 East 26 20
6 Moksh 37000 South 28 B 10
7 Shelly 36000 North 26 A 30
Table: Department
Dept DNam MinSal MaxSa HOD
e l
10 Sales 25000 32000 1
20 Finance 30000 50000 5
30 Admin 25000 40000 7
Write SQL commands to:
Create Table
1. Create the table Employee. 2. Create the table Department.
Insert data in a table
2. Insert data in the table Employee 3. Insert data in the table
Department.
Simple Select
3. Display the details of all the employees.
4. Display the Salary, Zone, and Grade of all the employees.
5. Display the records of all the employees along with their annual
salaries. The Salary column of the table contains monthly salaries
of the employees.
6. Display the records of all the employees along with their annual
salaries. The Salary column of the table contains monthly salaries
of the employees. The new column should be given the name
“Annual Salary”.
Conditional Select using Where Clause
7. Display the details of all the employees who are below 30 years
of age.
8. Display the names of all the employees working in North zone.
9. Display the salaries of all the employees of department 10.
Using NULL
10. Display the details of all the employees whose Grade is NULL.
11. Display the details of all the employees whose Grade is not
NULL.
Using DISTINCT Clause
12. Display the names of various zones from the table Employee. A
zone name should appear only once.
13. Display the various department numbers from the table
Employee. A department number should be displayed only once.
Using Logical Operators (NOT, AND, OR)
14. Display the details of all the employees of department 10 who are
above 30 years of age.
15. Display the details of all the employees who are getting a salary
of more than 35000 in the department 30.
16. Display the names and salaries of all the employees who are not
working in department 20.
17. Display the names and salaries of all the employees who are
working neither in West zone nor in Centre zone.
18. Display the names of all the employees who are working in
department 20 or 30.
19. Display the details of all the employees whose salary is between
32000 and 38000.
20. Display the details of all the employees whose grade is between
‘A’ and ‘C’.
21. Display the details of all the employees aged above 30 in West
zone.
Using IN Operator
22. Display the names of all the employees who are working in
department 20 or 30. (Using IN operator)
23. Display the names and salaries of all the employees who are
working neither in West zone nor in Centre zone. (Using IN
operator)
Using BETWEEN Operator
24. Display the details of all the employees whose salary is between
32000 and 38000.
(Using BETWEEN operator)
25. Display the details of all the employees whose grade is between
‘A’ and ‘C’.
(Using BETWEEN operator)
Using LIKE Operator
26. Display the name, salary, and age of all the employees whose
names start with ‘M’.
27. Display the name, salary, and age of all the employees whose
names end with ‘a’.
28. Display the name, salary, and age of all the employees whose
names contain ‘a’
29. Display the name, salary, and age of all the employees whose
names do not contain ‘a’
30. Display the details of all the employees whose names contain ‘a’
as the second character.
Using Aggregate functions
31. Display the sum and average of the salaries of all the employees.
32. Display the highest and the lowest salaries being paid in
department 10.
33. Display the number of employees working in department 10.
Using ORDER BY clause
34. Display the details of all the employees in the ascending order of
their salaries.
35. Display the details of all the employees in the descending order
of their names.
36. Display the details of all the employees in the ascending order of
their grades and within grades in the descending order of their
salaries.
Using GROUP BY clause
37. Display the total number of employees in each department.
38. Display the highest salary, lowest salary, and average salary of
each zone.
39. Display the average age of employees in each department only
for those departments in which average age is more than 30.
Using UPDATE, DELETE, ALTER TABLE
40. Put the grade B for all those whose grade is NULL.
41. Increase the salary of all the employees above 30 years of age by
10%.
42. Delete the records of all the employees whose grade is C and
salary is below 30000.
43. Delete the records of all the employees of department 10 who are
above 40 years of age.
44. Add another column HireDate of type Date in the Employee
table.
JOIN of two tables
45. Display the details of all the employees who work in Sales
department.
46. Display the Name and Department Name of all the employees.
47. Display the names of all the employees whose salary is out of the
specified range for the corresponding department.
48. Display the name of the department and the name of the
corresponding HOD for all the departments.