1 Q3 Answer the following

advertisement
First Term Exam
Class-XII
Informatics Practices
Instructions
Marks: 70
 All the questions are compulsory
 Read questions carefully before attempting
Q1 Answer the following:
a)
b)
c)
d)
e)
f)
g)
What are various Biometric Devices?
Name some pointing devices
Who invented punched card?
Name the Super computers developed in India.
What is the difference between hardware, software and firmware?
How is a compiler different from interpreter?
What is the difference between OCR and OMR?
1
1
1
1
2
2
2
Q2 Answer the following:
a)
b)
c)
d)
e)
f)
What are various categories of software?
What is application software? Why is it required?
What is IDE?
What is Operating System? What is its role?
What is a Virus? What is anti-virus software?
What is Phishing?
2
2
1
2
2
1
Q3 Answer the following:
g) Distinguish between unary, binary & ternary operators. Give examples of Java operators
for each one of them.
2
h) Differentiate the following:
2
jTextField & jTextArea Control
jCheckBox & jRadioButton Control
i) What do you mean by a variable? How you will declare a variable in Java? Explain with
example.
2
j) What are containers or container controls?
1
k) What are different characteristics of Java?
2
l) What is Event?
1
Q4 Answer the following:
a) Develop an application to prepare students result on the basis of marks entered. A
sample screenshot is being shown below:
Write the code for calculate button to calculate total marks and percentage
b) Write a program to find the sum of all natural numbers up to n.
c) Rewrite the following code using switch:
if ( ch ==’E’)
Eastern++;
if(ch==’W’)
Western++;
if(ch==’N’)
Northern++;
else
Unknown++;
2
2
2
d) Write the program to calculate commission for the salesmen. The commission is
calculated according to following rates:
3
Sales
30001 onwards
22001 – 30000
12001-22000
5001- 12000
0-5000
Commission Rate
15%
10%
7%
3%
0%
e) Evaluate x = ++y + 2y if y=6
1
Q5 Answer the following:
a) What is the difference between Like and Between clause?
2
b) What do you mean by order by clause?
c) Differentiate the following with example:
i. Alter and Update command
ii. Delete and Drop command
d) How can you remove the column of a table? Explain with example.
e) Removing the errors from query and rewriting it.
2
2
1
1
Select* from book where Price=NULL;
f) Rajan created a table named Item, he wants to see those Items whose price is between
200 and 800. He wrote a querySELECT * FROM Item WHOSE price>200 OR <800;
1
Help Rajan to run the query by removing the errors from the query by rewriting it.
g) Which MySQL command helps you to see existing databases?
1
Q6 (a)Consider the table STUDENT given below, write SQL Commands for (i) to (v)
RollNo Name
(i)
(ii)
(iii)
(iv)
(v)
1
Nanda
2
Class DOB
Sex City
Agra
5
Marks
X
6/6/95
M
551
Saurabh
XII
7/5/93
M
3
Sanal
XI
6/5/94
F
4
Trisla
XII
8/8/95
F
5
Store
XII
8/10/95
M
Delhi
369
6
Marisla
XI
12/12/94
F
Dubai
250
7
Neha
X
8/12/95
F
Moscow 377
8
Nishant
X
12/6/95
M
Moscow 489
Mumbai 462
Delhi
400
Mumbai 450
To display all the males whose city is either Delhi or Mumbai.
To display the details of all the students whose date of birth is after Nishant’s Birth
date.
List names all class of all students in descending order of DOB.
Display the list of the students who lived in Delhi, Mumbai or Agra
Display the name of the students whose name contains ‘i’ as any alphabet
b) Consider the following table SHOP and write the queries
5
Relation: SHOP
No
Shop_name
Sale
Area
Cut_percent Rating City
1
S.M Sons
250000 West
68.6
C
Delhi
2
Dharohar
500000 South
81.8
A
Mumbai
3
Kirti Stores
300000 North
79.8
B
Kolkata
4
Rajat stores
380000 North
88
B
Mumbai
5
Biswas
456000 East
92
A
Delhi
6
Crystal
290000 South
66.7
A
Kolkata
Write MySql commands for the following statements:
i)
To display the names of all shops which are in the South.
ii)
To display name and customer percentage of all the shops having
cust_percent>80
iii)
To display the list of all the shops with sale>300000 in ascending order of
shop_name
iv)
Display a report with shop_name, area and rating for each shop in the table, for
only those shops whose sale is between 350000 and 400000 (including both
350000 and 400000)
v)
To insert details of new shop in the table shop with following data:
7, “The Shop”, 550000, “south”, 90.8, “A”, “Ahemedabad”
Q 7 (a) Give the output :
i.
SELECT SUBSTR(RTRIM(‘INDIA IS GREAT ‘),3,9);
ii.
SELECT CONCAT(UPPER(‘xiHum’),LOWER(‘xiSc’), UPPER(SUBSTR(‘xiCom’, 2,3)));
iii.
SELECT SQRT(-144);
iv.
SELECT LENGTH(“Informatics Practices”) – 2;
v.
SELECT POW(-2, 4);
5
b) What do you mean by database transaction and what are it’s stage?
2
c) What do you mean by degree and cardinality of a relation?
2
d) What do you mean by data redundancy
1
Download