Professional Documents
Culture Documents
Kendriya Vidyalaya Sangathan, Chandigarh Pre-Board Examination-I Class Xii Informatics Preacites (065) - Theory Paper-6
Kendriya Vidyalaya Sangathan, Chandigarh Pre-Board Examination-I Class Xii Informatics Preacites (065) - Theory Paper-6
PRE-BOARD EXAMINATION-I
CLASS XII
INFORMATICS PREACITES (065)-THEORY PAPER-6
Time allowed: 3 hours Maximum Marks: 70
Instructions:
(i) All questions are compulsory
(ii) Programming language : Java ,SQL
1. (a) Ankit transferred one file to one remote host at head office. Which protocol is used for this 1
purpose?
(b) Two doctors in the same room have connected their Palm Tops using Bluetooth for working on a 1
Group presentation. Out of the following, what kind of Network they have formed?
LAN, MAN, PAN, WAN
(c) Arrange the following communication channels in ascending order of their data 1
transmission rates.
Ethernet Cable, Optical Fiber, Telephone Cable, Co-axial Cable
(d) Which of the following are open standards and which are proprietary standards? 1
(i) WMA (ii) DOC (iii) JPEG (iv) HTML
(e) Akanksha says that the following numbers indicate an address : 2
208.77.188.166
What is the above address called? To which object/device is it assigned?
(f) Compare PAN, LAN, MAN, WAN in terms of Speed and Error rate 2
(g) What are Dynamic fonts? How they are different from Static fonts? 2
2 (a) While working in Netbeans, Rajmeeta included a Listbox in the form. Now she wants the list of 1
. her friends' names to be displayed in it. Which property of Listbox control should she use to do
this?
(b) What is the purpose of break in a switch statement? 1
(c) Which HTML tag inserts an image on a web page? 1
(d) How is <P> tag different from <BR> tag in HTML? 1
(e) How many times does the following loop execute? What is the value of num after the execution? 2
int num=5;
do
{
System.out.println(“Hello world”);
num--;
}while (num>2);
(f) What will be the output of the following code fragment: 2
int num=2345;
int res=0;
while(num>0)
{
int r = num%10;
res=res*10+r;
num/=10;
}
lblRes.setText(“The result is:” + res);
Page 1 of 16
(g) Differentiate between XML and HTML . 2
3 (a) Which MySQL command is used to make permanent changes on the databases? 1
.
(b) Mr. Sunil created a table “BOOK” in MySQL. He forget to set the PRIMARY KEY for the 1
table. Which command should he used to set it for the field “BID”.
(c) Uma, an employee of ABC enterprises has created a table "CANDIDATES". EXP is one of the 1
columns of the table which stores no of years of experience as integer. She wants to find out the
names of candidates who are fresher.
MySQL>SELECT NAME FROM CANDIDATEDS WHERE EXP IS fresher;
Find out the errors and rewrite the above query.
Lekshmi 3500
Ganesh 2700
(f) What do you mean by database transaction? What is role of the Savepoint while partial rollback 2
of a transaction? Explain with an example.
(g) A table ACCOUNTS in a database has 14 columns and 4 records. What is its degree and 2
cardinality , if 2 rows are deleted from the table?
4 (a) What will be the contents of the text1 and text2 after the following code is executed. 1
. String text1,text2;
text1 = “ Kendriya Vidyalaya”;
text2.setText(text1.length()+“ ”);
text1=text1.concat(“ Sangathan”);
(b) Write the following if else statement using Switch statement 2
if(reg==’e’ || reg==’E’)
RegCode=”KVSSR”;
else if(reg==’w’ || reg==’W’)
RegCode=”KVSJPR”;
else if(reg==’s’ || reg=’S’)
RegCode=”KVSHR”;
else if(reg==’n’ || reg==’N’)
Regcode=”KVSND”;
(c) Locate the errors in the following code fragment and re-write the code with underlined 2
corrections :
integer num=20,i=1;
long sum=0;
do(i<num)
{
sum=+i;
i+1=i;
}
Page 2 of 16
jTextField1.settext(“”+sum);
(d) Write a java statement to make the jTextField1 non-editable. 1
(e) What will be displayed in jTextField1 and jTextField2 after the execution of the 2
following code?
int Last, First=3,Second=5;
Last=First+ Second++;
jTextField1.setText(Integer.toString(Last));
jTextField2.setText(Integer.toString(Second));
(f) What will the content of jTextField1 after executing the following statements 1
String S=”vidyalaya”;
jTextField1.setText(s.substring(0,1).toUpperCase()+s.substring(1));
(g) The students of “ Kendriya Vidyalaya” work for different extracurricular activities like ‘ Swachh
Bharat ABhiyan ’, ‘Swachh Vidyalaya Abhiyan’ and ‘Road Safety Abhiyan’. The Programmer at
the school has developed a GUI application as shown below:
STUDENT
(i) To display all the information of males whose city is NEITHER Delhi or Mumbai.
(ii) To display the details of all the students whose date of birth is after Nishant’s Birth
date 12/6/95.
(iii) To Display all information about class XII students rankwise (descending order).
(iv) List names of all students in agewise.
(v) SELECT Name ,Class, City FROM STUDENT WHERE Class =’XII’ AND City=
‘Mumbai’;
(vi) SELECT DISTINCT (Sex) FROM STUDENT.
(vii) SELECT AVG(Marks), Class FROM STUDENT GROUP BY class.
(viii) SELECT COUNT(*)FROM STUDENT WHERE Class = ‘XI’ .
6 (a) Write SQL to Create the following table BANK with specified constraints 2
.
Column Name Data type Constraint
BankCode Character of 10 size Primary Key
Branch Character of 30 size
City Character of 30 size City can have only two values “Hyderabad”,”Delhi”
Budget Numeric(7,2)
(b) In a database there are two tables Books and Issued as shown below. 2
Books Issued
Book_Id Book_name Quantity Book_Id Quantity-issued
C001 Fast Cook 5 T001 4
F001 The Tears 20 C001 5
T001 C++ 10 F001 2
T002 VB 15
F002 NetBeans 50
(i) Identify the foreign key column in the table Issued.
Page 4 of 16
(ii) How many rows and columns will be there in the Natural Join of these two tables?
(c) Study the following table TEACHER and SALARY and write the MySQL commands for the
questions (i) and (ii) and give outputs for MySQL queries (iii) and (iv).
Table : TEACHER
Table : SALARY
i Display NAME and DA of all staff who are in Accounts department and having more than 10 2
years of experience and DA is more than 300.
ii Display the NAME and SALARY of all staff whose salary is more than average salary. 2
(SALARY=BASIC +ALLOWANCE+ DA)
iii Select NAME, DA, BASIC from TEACHER, SALARY Where BASIC>20000 and 1
TEACHER.SID=SALARY.SID;
iv Select NAME, DEPT, SEX, BASIC, DA from TEACHER, SALARY Where DEPT LIKE ‘%o 1
%’ and DA >=500 and TEACHER.SID=SALARY.SID;
7 (a) Give Domain names of two most commonly used e-governance websites? 1
.
(b) What are the social impacts of e-commerce? Write any 2 positive and 2 negative impacts. 2
Page 5 of 16
(c) Mr. Pradeep is developing one application for accounting purpose. He wants to create some controls on 2
a form for the following functions. Choose appropriate controls from Text field, Text Area, Label, radio
button, check box, list box, combo box, button, Option pane, dialog box, menu items.
S.No. Control used to Control
1 Enter id no.
2 Select payment mode (cash/credit)
3 Select items for purchase from given list
4 Save the data
Page 6 of 16
MARKING SCHEME
CLASS XII – PRE-BOARD EXAMINATION-I
INFORMATICS PREACITES (065)-THEORY PAPER-6
Time allowed: 3 hours Maximum Marks: 70
Instructions:
(iii) All questions are compulsory.
(iv) Programming language : Java, SQL.
1. (a) Kavita transferred one file to one remote host at head office. Which protocol is used for 1
this purpose.
FTP-File Transfer Protocol
(1 mark for correct answer)
(b) Two doctors in the same room have connected their Palm Tops using Bluetooth for 1
working on a Group presentation. Out of the following, what kind of Network they have
formed?
LAN, MAN, PAN, WAN
PAN
(1 mark for correct answer)
(c) Arrange the following communication channels in ascending order of their data 1
transmission rates.
Ethernet Cable, Optical Fiber, Telephone Cable, Co-axial Cable
Telephone Cable, Ethernet Cable, Co-axial Cable, Optical Fiber
(1 Mark for correct answer)
(d) (d) Which of the following are open standards and which are proprietary standards? 1
(i) WMA (ii) DOC (iii) JPEG (iv) HTML
Proprietery- WMA, DOC
Open- JPEG, HTML (1 Mark for correct answer)
(e) Akanksha says that the following numbers indicate an address : 2
208.77.188.166
What is the above address called? To which object/device is it assigned?
The above address is called an IP address or Internet Protocol address.
It is a numerical label that is assigned to devices participating in a
network
( 1 mark for each part)
(f) Compare PAN, LAN, MAN, WAN in terms of Speed and Error rate 2
NETWORK PAN LAN MAN MAN
Hello world
Hello world
Hello world
2
( 1 mark for each correct no. of times of loop execution)
( 1 mark each for correct value of num)
(f) What will be the output of the following code fragment: 2
int num=2345;
int res=0;
while(num>0)
{
int r = num%10;
res=res*10+r;
num/=10;
}
lblRes.setText(“The result is:” + res);
Page 8 of 16
XML tags HTML tags
New tags can be created using New tags cannot be created
XML tags cannot be empty using
tags. HTML tags can be empty tags.
XML is case sensitive HTML is not case sensitive
(1 marks for correct for each)
3. (a) Which MySql command is used to make permanent changes on the databases? 1
COMMITT COMMAND
(1 mark for correct answer)
(b) Mr.Sunil created a table “BOOK” in MySQL. He forget to set the PRIMARY KEY for the 1
table. Which command should he used to set it for the field “Bid”.
Alter table
(1 mark for correct answer)
(c) Uma, an employee of XYZ enterprises has created a tabel "CANDIDATES".EXP is one of 1
the columns of the table which stores no of years of experience as integer. She wants to
find out the names of candidates who are fresher. mysql>SELECT NAME FROM
CANDIDATEDS WHERE EXP IS fresher;
Find out the errors and rewrite the above query.
ERROR- EXP IS fresher (no fresher criteria is mentioned).
CORRECTION- select NAME from candidates where EXP = 0;
( ½ for each correct )
(d) Can a table have multiple PRIMARY KEY? Explain. 1
No. Each table can have only one primary key .
(1 mark for correct answer)
EMP table
Lekshmi 3500
Ganesh 2700
int num=20,i=1;
long sum=0;
while(i<num)
{ sum =+i;
i=i+1;
}
jTextField1.setText(“”+sum);
Page 10 of 16
( ½ mark for each correction)
(d) Write a java statement to make the jTextField1 non-editable. 1
jTextField1.setEditable(false);
(1 mark for correct answer)
(e) What will be displayed in jTextField1 and jTextField2 after the execution of 2
the following code?
int Last,First=3,Second=5;
Last=First+Second++; jTextField1.setText(Integer.toString(Last));
jTextField2.setText(Integer.toString(Second));
jTextField1 – 8
jTextField2 – 6
(1 mark for each correct answer)
(f) What will the content of TextField after executing the following statements 1
String S=”vidyalaya”;
jTextField1.setText(s.substring(0,1).toUpperCase()+s.substring(1));
Vidyalaya
(1 mark for each correct answer)
(g) The students of “Kendrya Vidyalaya” work for different extracurricular activities like ‘
Swachh Bharat ABhiyan ’, ‘Swachh Vidyalaya Abhiyan’ and ‘Road Safety Abhiyan’. The
Programmer at the school has developed a GUI application as shown below:
2
1
Page 11 of 16
(i) Private void jButton1ActionPerformed(..)
int rno=Integer.parseInt(TF1.getText());
String Name=TF2.getText();
int score=0;
if(jCheckBox1.isSelected())
{
TF3.setText("" + 20);
score=score+20;
}
if(jCheckBox2.isSelected())
{
TF4.setText("" + 10);
score=score+10;
}
if(jCheckBox3.isSelected())
{ TF5.setText("" + 10);
score=score+10;
}
TA1.setText("RollNo: "+rno+"\n"+"Name: "+Name+"\n"+"Score: "+score);
}
Page 12 of 16
Candidate Keys: Admno, Rollno+Class ( 1 mark )
Primary Key: Admno (1 mark)
(c) Consider the table STUDENT given below, write MySQL Commands for (i) to (v) and output for 6
(vi) to (viii):
Name Class DOB Sex City Marks
Nanda X 6/6/95 M Agra 551
Saurabh XII 7/5/93 M Mumbai 462
Sanal XI 6/5/94 F Delhi 400
Trisla XII 8/8/95 F Mumbai 450
Store XII 8/10/95 M Delhi 369
Marisla XI 12/12/94 F Dubai 250
Neha X 8/12/95 F Moscow 377
Nishant X 12/6/95 M Moscow 489
(viii) To display all the information of males whose city is NEITHER Delhi or Mumbai.
Ans: SELECT * FROM STUDENT WHERE Sex=’M’ AND NOT City IN(‘Delhi’,
‘Mumbai’));
(1mark for correct and ½ for partial correct)
(ix) To display the details of all the students whose date of birth is after Nishant’s Birth
date 12/6/95.
Ans: SELECT * FROM STUDENT WHERE DOB> ‘12/6/95’;
(1mark for correct and ½ for partial correct)
(x) To Display all information about class XII students rankwise (descending order).
Ans: SELECT * FROM STUDENT WHERE Class= ‘XII’ order by Marks desc;
(1mark for correct and ½ for partial correct)
(xi) List names of all students in agewise.
Ans: SELECT Name FROM STUDENT ORDER BY DOB ;
or
Ans: SELECT Name FROM STUDENT ORDER BY DOB DESC;
(1mark for correct and ½ for partial correct)
(xii) SELECT COUNT(*) FROM STUDENT WHERE Class =’XII’ AND City=
‘Mumbai’;
Ans:
Name Class City
Saurabh XII Mumbai
Trisla XII Mumbai
( ½ mark for correct )
(xiii) SELECT DISTINCT (Sex) FROM STUDENT.
Ans:
DISTINCT
(Sex)
M
F
( ½ mark for correct )
(xiv) SELECT AVG(Marks), Class FROM STUDENT GROUP BY class. Ans:
AVG(Marks) Clas
s
459 X
427 XII
325 XI
( ½ mark for correct )
(viii) SELECT COUNT(*)FROM STUDENT WHERE Class = ‘XI’
Page 13 of 16
Ans:
count
(*)
2
( ½ mark for correct )
6. (a) Write SQL to Create the following table BANK with specified constraints 2
2
Page 14 of 16
107 Naman Chemistry M 10
114 Nupur Computer F 3
109 Janvi Physics F 9
105 Rama Accounts M 10
117 James Computer F 3
111 Binoy Accounts F 12
130 Samuel Computer M 15
Table : SALARY
SID BASIC ALLOWANCE DA
101 12000 1000 300
104 23000 2300 500
107 32000 4000 500
114 12000 5200 1000
109 42000 1700 200
105 18900 1690 300
130 21700 2600 300
Display NAME and DA of all staff who are in Accounts department and having more than
10 years of experience and DA is more than 300.
Ans: Select NAME, DA from TEACHER T, SALARY S Where DEPT= ‘Accounts’ AND
EXPERIENCE >10 AND DA>300 AND S.SID=T.SID;
(2 marks for correct answer and 1 marks for partial correct answer)
Display the NAME and SALARY of all staff whose salary is more than average salary.
(SALARY=BASIC +ALLOWANCE+ DA)
Ans: Select NAME, BASIC+ALLOWANCE+DA AS ‘SALARY’ from TEACHER T, SALARY
S Where (BASIC+ALLOWANCE+DA)>(select AVG(BASIC +ALLOWANCE+ DA) from
salary);
(2 marks for correct answer and 1 marks for partial correct answer)
Select NAME, DA, BASIC from TEACHER, SALARY Where BASIC>20000 and
TEACHER.SID=SALARY.SID; Ans:
NAME DA BASIC
Raghav 500 23000
Naman 500 32000
Janvi 200 42000
Samuel 300 21700
(vi) Select NAME, DEPT, SEX, BASIC, DA from TEACHER, SALARY Where DEPT
LIKE ‘%o%’ and DA >=500 and TEACHER.SID=SALARY.SID; (1)
Ans:
NAME DEPT SEX BASIC DA
Nupur Computer F 12000 1000
7. (a) Give Domain names of two most commonly used e-Governance websites? 1
www.india.gov.in,
www.rti.gov.in
(1/2 mark for each correct example)
(b) What are the social impacts of e-commerce? Write any 2 positive and 2 negative impacts. 2
Positive impact
Page 15 of 16
1. The reduction in transaction and other costs
2. Improve customer service
Or any others
Negative impact
1. Poor telecom and infrastructure for reliable connectivity
2. Multiple gaps in the current legal and regulatory framework
Or any others
(1 mark for positive impacts,1 mark for negative impacts)
(c) Mr. Pradeep is developing one application for accounting purpose. He wants to create 2
some controls on a form for the following functions. Choose appropriate controls from
Text field, Text Area, Label, radio button, check box, list box, combo box, button, Option
pane, dialog box, menu items.
1 Enter id no.
Page 16 of 16