IT_P2_CLASS 12_2023-24
IT_P2_CLASS 12_2023-24
Information technology(802)
Class:12
Max. Time: 3 hrs. Max.Marks: 60
General Instructions:
Q7. A table FLIGHT has 4 rows and 2 columns and another table AIRHOSTESS has rows 2
and 4 columns. How many rows and columns will be there if we obtain the cartesian
product of these two tables?
Q8. Write the Precautions while Performing Online Transactions. 2
Q9. What is the purpose of ALTER TABLE command in MySQL? How it is different 2
from UPDATE commands?
Q10. Write a java program to calculate sum of two entered numbers.(Run time input) 2
Q11. Mr. Amit wants to go for a business trip .He is thinking of booking a flight. 2
(a) Name any one site which he should browse for booking an air ticket.
(b) Give any one benefit of online reservation to Amit?
Q12. Ms Prabha has mistakenly entered „„AMIT‟‟ instead of „„AMITA‟‟ in name field of 2
table „TEACHER‟. Help her to write the correct SQL command to make the desired
changes in the table
Q13. Find the error and give the correct code 2
int number=1;
while(number<=5)
{System.out.print(“Square of ” + number);
system.out.println(” = ” + number*number);}
Q14. Explain the following term: 2
DISNIC, DEITY
Q15. Give two differences between while loop and do while loop . 2
Q16. List the various ways in which database management applications can be used in 2
Government Sector
Q18 Create a program of for loop that displays all SUM odd numbers between 1 to 10. 3
Q19 What is the purpose of group by command? How is it different from Order by 3
command? Give example.
Answer any 3 out of the given 5 questions (4 x 3 = 12 marks)
Q20. i. What will be the value of rem after the execution of the following code 4
snippet? Give reason.
code =2;
switch(code)
{case 1: rem= 8;
case 2: rem= 9;
case 3: rem= 10; break;
case 4: rem= 11; break;}
answer
rem=10
ii. What will be the value of n after the execution of the following selection
statement :
int n=0;
if (6>7 II 5>4)
{n=5;}
else
n=7;
Q21. A Railway company uses machines to sell tickets. The machine details and daily 4
sales information are recorded in two tables:
The primary key of the table Machine is Machine_ID. Records in the table Sales are
uniquely identified by the fields Machine_ID and Date.
(A) Create the tables Machine and Sales.
(B) Write a query to find the number of ticket machines in each station.
(C) Write a query to find the total ticket income of the station “New Delhi” of each
day.
(D) Write a query to find the total number of tickets sold by the machine
(Machine_ID = 122) till date
Q22. Write a JAVA program to calculate Marks in 5 subjects and show the percentage of 4
Students. Also calculate grade as per given condition:
Per<45 print grade “E”
Per>45 print grade “D”
Per>70 print grade “C”
Per>80 print grade “B”
Per>90 print grade “A”
Q23. A. How database management concepts are helpful in Government sector? 4
B. A Hospital is making database of patients and its staff. Doctor table
includes Docid, Dname, and Department. Give details of Patient Table
along with its schema.
Q24. Write the Mysql commands for the following queries :- 4
TRAIN
TrainID Station
0001 DELHI
0002 MUMBAI
COUNTER
Ticket Date Cost TrainN
ID o
T1 12/3/22 500 0001
T2 15/5/22 450 0002
T3 15/5/22 500 0001
(A) To find all the stations, date for ticket id as T1.
(B) To find the total ticket amount collected from each station.
(C) To displays all the tables created in the current database.
(D) To delete table counter along with the information in it.
*****************************************************************************