Sample Question Paper : I

Sample Question Paper : I
Sample Question Paper - I
INFORMATICS PRACTICES
Class-XII
TIME : 3 hours
MM : 70
Types of Questions
Marks Per Question
Total Number of Questions
Total Marks
SA I
1
16
16
SA II
2
18
36
LA
6
3
18
37
70
Total
Blue Print - Sample Question Paper - I
INFORMATICS PRACTICES
Class-XII
TIME : 3 hours
MM : 70
SA (1 mark)
SA (2 marks)
LA (6 marks)
Total
Networking and Open Standards
4(4)
3(6)
-
7(10)
Programming
7(7)
6(12)
1(6)
14(25)
4(4)
7(14)
2(12)
13(30)
1(1)
2(4)
-
3(5)
16(16)
18(36)
3(18)
37(70)
Topic / Unit
Relational
System
Database
IT Applications
Total
Management
2
Sample
e Question Paaper: I
Serries: SOS/1
Sample Question
Q
Pa
aper - I
INFORMA
ATICS PRAC
CTICES
Class-XII
C
TIME : 3 hours
1
MM : 7
70
(a))
Tara Natthani wants to upload and download
d
files from/to a rem
mote intenet se
erver, write the
e
name of the relevant co
ommunication
n protocol, whiich will let her do the same.
An
ns.
FTP)
File Transfer Protocol (F
(b))
Two docttors in the sam
me room have connected the
eir Palm Tops using Bluetoo
oth for working
g
on a Gro
oup presentatio
on. Out of the following, wh at kind of Netw
work they havve formed?
LAN, MA
AN, PAN, WAN
N
An
ns.
k (PAN)
Personal Area Network
(c)
Arrange the followin
ng communication channe
els in ascend
ding order o
of their data
a
transmisssion rates.
Ethernet Cable, Optica
al Fiber, Teleph
hone Cable, C o-axial Cable
An
ns.
Telephon
ne Cable, Ethernet Cable, Co
o-axial Cable, Optical Fiber
(d))
Which off the following is not a chara
acteristic of Op
pen Source Sofftware?
Its source
e code is availa
able for modiffication
It is owne
ed by a compa
any or an indivvidual
It can be downloaded from
f
internet
An
ns.
ed by a compa
any or an indivvidual.
It is owne
(e))
Jai Khanna is confused
d between the
e terms Doma
ain Name and URL. Explain the difference
e
with the help of approp
priate example
es of each.
An
ns.
An easier way of remembering a web
bsite is by its U
Uniform Resou
urce Locator (U
URL), which is a
simple sttring of characters used to re
epresent and id
dentify a Web page or webssite. Unlike the
e
IP addresss, the URL co
onsists of text, which makess it easier to rremember. An example of a
URL is, http://www.g
google.com. In this URL, w
www.google.ccom is the dom
main name. A
domain name
n
consists of the followin
ng three parts::
((1 Mark for Ab
bbreviation and
d/or Full Form)
(1 Mark for ccorrect answerr)
(1 Mark for ccorrect answerr)
•
•
•
(1 Mark for ccorrect answerr)
www
w
Nam
me of the website
Top
p Level Domain
n (TLD), such as
a .com, .net, .o
d .in
org, .edu, and
(2
2 marks for correct explanatiion of differen
nce with the he
elp of example)
(f)
ny two threats to Network Se
ecurity.
Define an
An
ns.
t
to Netw
work Security are
a as follows::
The two threats
•
Worms: Refer to malicious pro
ograms that ca
an copy themsselves and use
e networks to
send copies of the
emselves to other computerss. A worm cau
uses harm by consuming the
er through self--replication.
entiire disk space or memory of your compute
•
Sno
ooping: Referss to the act ga
aining unauth
horized access to a user’s files and other
perssonal information, such as password and
d login details,, without the k
knowledge or
permission of the
e user. This inccludes monitorring the activitty of the user on a network
u
snooping
g software.
by using
ny two threats)
(1 mark e
each for correcctly defining an
Sample Q
Question Pap
per: I
(g))
S
and Bus Topology
T
of ne tworks.
Differentiate between Star
An
ns.
n Star and Buss Topology is a s follows:
The difference between
•
3
pology, each n
node of the n
network is connected to the
Star Topology: In the star top
central node (also
o known as hub) through a single path. TThe star topollogy is one of
the most popularr topologies in
n networks tha
at are used fo
or data processsing or voice
mmunication. An
A example off the star topollogy is the insttallation of IBM
M 370, where
com
327
70 terminals are
a connected to a central node or host system. The IBM 370 is a
mod
del range of IBM mainframes. Figure A sshows the arra
angement of d
devices in the
starr topology:
Figure A: A Network with tthe Star Topolog
gy
•
Buss Topology: The bus topo
ology has a ssingle transmiission medium
m with which
seve
eral nodes are
e connected. In
n this topologyy, a host locate
ed at one end of the bus (or
the central node) communicate
es with all the other nodes a
attached along
g its length. In
the bus topology, data transmission can takke place from any workstation (or node).
How
wever, data tra
avels along th
he length of th
he bus in both
h directions, an
nd is received
by all
a workstation
ns. Terminatorrs present at b
both ends of tthe bus help tto absorb the
sign
nal, removing it from the bu
us. Figure B sshows the arra
angement of d
devices in the
bus topology:
Figure B: A Network with tthe Bus Topolog
gy
(2 marks for corrrect difference)
2
(a))
While wo
orking in NetBeans, Rajmeetta included a LListbox in the fform. Now she
e wants the list
of her friiends' names to
t be displayed
d in it. Which property of Lisstbox control sshould she use
e
to do thiss?
An
ns.
Model
(b))
What is the
t purpose off default clause
e in a switch sttatement?
An
ns.
Default clause
c
is used to
t handle the case
c
when no match of any case in the sw
witch
statemen
nt is found.
(1 mark for ccorrect answerr)
(1 mark
k)
4
Sample
e Question Paaper: I
(c)
Which HT
TML tag insertss a horizontal straight line o
on a web page?
An
ns.
ag
<HR> ta
(d))
<
tag differe
ent from <BR>
> tag in HTML?
?
How is <P>
An
ns.
<P> tag inserts a blank line and starrts a new para
agraph wherea
as <BR> tag fo
orces text
to a new line like the <P>
<
tag, but without
w
insertin
ng a blank line
e.
(1
1 mark for corrrect difference)
(e))
How many times will each
e
of the fo
ollowing loops execute? Which one of the
ese is an entryy
control lo
oop and which
h one is an exitt control loop?
?
Loop1:
Loop2:
int sum = 0, i = 5;
int sum = 0, i = 5;
do
while (i<5
5)
= i; i++;} whiile (i<5);
{sum += i; i++;}
{ sum +=
An
ns.
Loop1 wiill execute once and Loop2 will
w execute 0 ttimes.
Loop1 is exit control loop and Loop2 is entry contro
ol loop.
( ½ mark for e
each correct no
o. of times of lo
oop execution)
( ½ mark eacch for correctlyy identifying the type of loop)
(f)
Write a function in java
a that takes tw
wo numbers two
o numbers as input from texxtfields and
t
sum.
displays their
An
ns.
(1 mark for ccorrect answerr)
int a=Integer.pa
arseInt(jTextF
Field1.getText
t());
int b=Integer.pa
arseInt(jTextF
Field2.getText
t());
int c;
c=a+
+b;
jTex
xtField3.setT
Text(""+c);
( ½ mark for gettting the input)
(1 mark for ca
alculating sum)
( ½ mark for displayin
ng in text field)
(g))
An
ns.
X
different from tags in HTTML? Write 2 p
points.
How are tags used in XML
XML Ta
ags
HTM
ML Tags
Allows users to define
e their own tag
gs
Allo
ows users to usse only predefined tags
Require
es the user to close
c
each tag
Doe
es not require tthe user to clo
ose each tag
(1 markk for each corrrect difference)
3
(a))
If a data
abase "Employe
ee" exists, which MySql com
mmand helps you to start w
working in that
database
e?
An
ns.
ployee
Use Emp
(b))
nd that there should have been another
Sahil cre
eated a table in MySql. Latter on he foun
column in the table. Which
W
command
d should he usse to add anotther column to
o the table?
An
ns.
Alter table
(c)
d a table "Boo
ok". Price is a ccolumn of thiss table. To find
d
Pooja, a students of class XI, created
hose prices havve not been en
ntered she wro
ote the followin
ng query:
the details of books wh
Select * from
f
Book whe
ere Price = NU
ULL;
Help Poo
oja to run the query
q
by removving the errorss from the que
ery and rewritin
ng it.
An
ns.
f
Book whe
ere Price IS NU
ULL;
Select * from
(1 mark for ccorrect answerr)
(1 mark for ccorrect answerr)
(1 mark for ccorrect answerr)
Sample Q
Question Pap
per: I
5
(d))
Rama is not able to ch
hange a value
e in a column to NULL. Wha
at constraint d
did she specifyy
when she
e created the table?
t
An
ns.
Rama spe
ecified 'NOT NULL'
N
constrain
nt for that colu
umn when she created the ta
able.
(1 mark for ccorrect answerr)
(e))
Distinguish between a Primary key and
a
Candidate
e key with the help of suitab
ble example of
each.
An
ns.
Candidatte key is a collumn or a gro
oup of columnss that can be a primary Keyy of a table. A
table can
n have multiple
e candidate ke
eys but it can h
have only one primary key. F
For example, A
table CU
USTOMER conta
ains the colum
mns CustomerIId, AccountNo
o, Name, Addrress, PhoneNo,
and Bala
ance. In this table CustomerIId and Accoun
ntNo (both are
e unique for evvery row in the
e
table) arre candidate keys.
k
Out of th
hese any one can be chosen as the prim
mary key of the
e
table.
(1 mark for co
orrect answer 1 mark for suittable example)
(f)
Name column of a table "Dirrectory" is give
en below:
The LastN
LastName
Batra
Sehgal
Bhatia
Sharma
Mehta
Based on
n this informatiion, find the output of the fo
ollowing querie
es:
a. SELEC
CT LastName FROM Directory WHERE last name like "_a%
%";
b. SELEC
CT LastName FROM Directory WHERE last name not like "%a";
4
An
ns.
a. LastN
Name
Batra
a
b. LastN
Name
Sehg
gal
(g))
A table "Stock"
"
in a da
atabase has 5 columns and contains 17 records. Whatt is the degree
e
and card
dinality of this table?
An
ns.
Degree = 5. Cardinaliity = 17
(a))
erence to objecct oriented pro
ogramming.
Define a class with refe
An
ns.
A class iss an abstract user-defined da
ata type that iss used as a blu
ueprint to defin
ne the
objects of
o that class.
( 1 mark for corrrect definition)
(b))
What will be the conten
nt of jTextField
d1 after executting the follow
wing code:
(1 mark
k for each part)
int Num = 6;
Num = Num + 1;
if ( Num > 5)
jTex
xtField1.setT
Text(Integer.t
toString(Num))
);
else
e
jTex
xtField1.setT
Text(Integer.t
toString(Num+ 5));
An
ns.
7
(c)
What will be the conten
nts of jTextArea1 after execu
uting the follow
wing statement:
a1.setText("Object\nOriented
d\tProgrammin
ng");
jTextArea
( 1 mark for ccorrect answerr)
6
Sample
e Question Paaper: I
An
ns.
jTextArea
a1 will display the following text:
Object Oriented
O
Progrramming
‘\n’ is used to break th
he string to the
e next line; how
wever, ‘\t’ is used to provide
e a tab spacing
g
between two strings.
(1 mark for contentss to be printed)
( ½ markk each for writting the effect of '\n' and ' \t')
(d))
p
code using switch sttatement:
Rewrite the following program
if (d == 1)
day = "Monday";
else
e if (d == 2)
day = "Tuesday";
else
e if (d == 3)
day = "Wednesday
y";
else
e
day = "-";
An
ns.
swit
tch(d)
{ ca
ase 1:
day = "Monday";
brea
ak;
case
e 2:
day = "Tuesday";
brea
ak;
case
e 3:
day = "Wednesday
y";
brea
ak;
defa
ault:
day = "-";}
(2 marks for ccorrect answerr)
(e))
The follo
owing code has
h
some error(s). Rewrite
e the correctt code underrlining all the
e
corrections made:
int i=2; j=5;
while j>i
{jTe
extField1.get
tText("j is gr
reater");
j--;++i;}
JOpt
tionPane.show
wMessageDialog
g("Hello");
An
ns.
int i=2, j=5;
while (j>i)
{ jT
TextField1.se
etText("j is greater");
g
j--;
++i;
}
JOpt
tionPane.show
wMessageDialog
g(this, "Hello
o");
( ½ mark e ach for identiffying and corre
ecting 4 errors)
(f)
What will be the conten
nts of jTextField1 and jTextFiield2 after exe
ecuting the following code:
String s = "ABC Micro Systems
s";
jTex
xtField1.setT
Text(s.length(
()+" ");
jTex
xtField2.setT
Text(s.toLower
rCase());
An
ns.
jTex
xtField1: 17
jTex
xtField2: abc
c micro system
ms
(1 Mark for 17
7
1 Mark for abc micro systems)
Sample Q
Question Pap
per: I
(g))
7
on for their co
ompany as sho
own below:
Glamourr Garments has developed a GUI applicatio
The company accepts payments in 3 modes- che
eque, cash and
d credit cards. The discount
p
is as follows.
f
given as per mode of payment
Mode of Payment
P
Discount
Cash
8%
Cheque
7%
Credit Card
d
Nil
If the Bill Amount is mo
ore than 1500
00 then the cusstomer gets an
n additional diiscount of 10%
%
on Bill Am
mount.
An
ns.
(i)
Wrrite the code to
t make the textfields for D
Discount (name
ed txtDisc) and
d Net Amount
(na
amed txtNetAm
mt) uneditable.
(ii)
Wrrite code to do
o the following:
(i)
(a)
When "Calcculate Discoun
nt" button is cliicked the disco
ount should be
e calculated ass
per the give
en criteria and
d it should be d
displayed in th
he discount texxtfield.
o be enabled.
"Calculate Net
N Amount" button
b
(named
d btnCalcNetAm
mt) should also
(b)
When "Callculate Net Amount"
A
butto n is clicked tthe net amou
unt should be
e
calculated and
a it should be
b displayed in
n the net amou
unt textfield.
txtDis
sc.setEditable(false);
txtNet
tAmt.setEdita
able(false);
(1 mark each for both parts)
8
Sample
e Question Paaper: I
(ii)
(a)
float BillAmt, NetAmt, Disc;
String
g ModeofPayment;
BillAm
mt = Float.pa
arseFloat(txtB
BillAmt.getTex
xt());
Modeof
fPayment = (String) cmbMod
de.getSelected
dItem();
if (Mo
odeofPayment.equals("Cash"
"))
Disc = BillAmt*8/1
100;
else if
i (ModeofPay
yment.equals("
"Cheque"))
Disc = BillAmt*7/1
100;
else Disc
D
= 0;
if (Bi
illAmt > 15000)
Disc = Disc + BillAmt*10/100;
btnCal
lcNetAmt.setEnabled(true);
;
txtDis
sc.setText(Disc+"");
( ½ Mark
M
for variablle declaration with appropria
ate data types)
( ½ Ma
ark for extractiing Bill Amoun
nt correctly from
m the text boxx)
( ½ Mark forr extracting Mo
ode of Paymen
nt correctly from
m Combo Boxx)
( ½ Mark for calculating corrrect Discount based on Mod
de of Payment)
( ½ Mark for calculating Discou
unt based on B
Bill Amount and displaying it)
( ½ Markk for Enabling b
btnCalNetAmt)
(b)
float BillAmt, NetAmt, Disc;
BillAm
mt = Float.pa
arseFloat(txtB
BillAmt.getTex
xt());
Disc = Float.parseFloat(txtDisc
c.getText());
NetAmt
t = BillAmt - Disc;
txtNet
tAmt.setText(NetAmt+"");
( ½ Markk for calculating
g Net Amount)
( ½ Markk for Displaying
g Net Amount)
5
(a))
An
ns.
Explain the
t
purpose off DDL and DM
ML commandss used in SQL.. Also give tw
wo examples of
each.
•
Datta Definition Language (D
DDL): DDL com
mmands are u
used to create,, destroy, and
to restructure the database obje
ects.
Example: CREATE
E and ALTER
•
Datta Manipulattion Languag
ge (DML): DM
ML commandss are used to insert, delete
and
d change data in tables.
Example: SELECT and DELETE
(½ Ma rk each for pu
urpose and exa
amples of DDLL)
amples of DMLL)
(½ Marrk each for purpose and exa
(b))
Write the
e output of the following SQLL queries:
a. SELEC
CT ROUND(6.5
5675, 2);
b. SELEC
CT TRUNCATE((5.3456, 1);
c. SELEC
CT DAYOFMON
NTH('2009-08
8-25');
d. SELEC
CT MID('Class 12',
1 2,3);
An
ns.
a.
b.
c.
d.
6.57
5.3
25
las
each for each ccorrect answerr)
( ½ Mark e
9
Sample Q
Question Pap
per: I
(c)
Considerr the table TEA
ACHER given below.
b
Write co
ommands in S
SQL for (1) to (4) and output
for (5) to (8)
TEACHER
R
Salary
ID
Name
N
Department
Hiredatte
Categ
gory
Gende
er
1
Tanya
T
Nanda
SocialStudie
es
1994-03
3-17
TGT
F
25000
2
Saurabh
S
Sharma
S
Art
1990-02
2-12
PRT
M
20000
3
Nandita
N
Arora
English
1980-05
5-16
PGT
F
30000
4
James
J
Jacob
English
1989-10
0-16
TGT
M
25000
5
Jaspreet
J
Kaur
Hindi
1990-08
8-01
PRT
F
22000
6
Disha
D
Sehgal
Math
1980-03
3-17
PRT
F
21000
7
Siddharth
S
Kapoor
K
Science
1994-09
9-02
TGT
M
27000
F
24500
(i)
Sonali
S
Math
1980-11
1-17 TGT
Mukherjee
M
o display all infformation abo
out teachers of PGT category .
To
(ii)
o display all infformation abo
out teachers of PGT category .
To
(iii)
To
o list names, departments
d
an
nd date of hirring of all the teachers in asscending order
off date of joining.
(iv)
o count the num
mber of teache
ers in English d
department.
To
(v)
ELECT MAX(Hirredate) FROM TEACHER;
SE
(vi)
ELECT DISTINC
CT(Category) FROM TEACHE R;
SE
(vii)
Category = "P
ELECT COUNT
T(*) FROM TEAC
CHER WHERE C
PGT"
SE
(viii)
ELECTAVG(Sala
ary) FROM TEA
ACHER group b
by Gender;
SE
(i)
ELECT * FROM TEACHER WH
HERE Category = 'PGT';
SE
(ii)
ELECT Name FROM TEACHER WHERE Gen der = 'F' AND Department = 'Hindi';
SE
(iii)
ELECT Name, Department,
D
Hiredate
H
FROM
M TEACHER OR
RDER BY Hiredate;
SE
(iv)
SE
ELECT count(*)FROM TEACHE
ER WHERE Dep
partment = 'En
nglish';
(1 Mark each for each
h correct queryy)
(v)
994-09-02
19
(vi)
TG
GT
PR
RT
PG
GT
8
An
ns.
(vii)
1
(viii)
4500
24
24
4000
10
6
(a))
Sample
e Question Paaper: I
Write an SQL query to create the tab
ble 'Menu' with the following structure:
An
ns.
Field
Type
T
Constraiint
ItemC
Code
Varchar(5)
V
Primary K
Key
ItemN
Name
Varchar(20)
V
Categ
gory
Varchar(20)
V
Price
Decimal(5,2)
D
CREA
ATE TABLE Men
nu
(ite
emcode varcha
ar(5) primary key,
item
mname varchar
r(20),
cate
egory varchar
r(20),
price decimal(5,2)
);
( ½ Ma
ark for CREATE
E TABLE Menu)
( ½ Mark for ap
ppropriately pu
utting Primary Key constraint)
( ½ Mark for corrrect data types)
( ½ Mark for correct synta
ax of the queryy)
(b))
In a data
abase there are
e two tables 'C
Customer' and 'Bill' as shown below:
Custome
er
Name
CustA
Address
CustomerID CustomerN
CustPho
one
1
Akhilesh Na
arang
C4,Ja
anak Puri,Delh
hi
9811078987
2
Purnima Willliams
B1, A
Ashok Vihar,De
elhi
9678678711
3
Sumedha Madaan
M
33, S
South Ext.,Delh
hi
6767655412
Bill
An
ns.
BillNo
o
CustID
Bill_Amt
1
2
12000
2
1
15000
3
2
13000
4
3
13000
(i)
2
14000
5
How
w many rows and
a how manyy columns will be there in the Cartesian prroduct of these
e
two
o tables?
(ii)
Wh
hich column in the 'Bill' table is the foreign key?
(i)
olumns
15 rows and 7 co
(ii)
CusstID
h for stating number of rowss and columns)
( ½ Mark each
(1 mark for choo
osing the corre
ect foreign keyy)
Sample Q
Question Pap
per: I
(c)
11
1
Considerr the tables HA
ANDSETS and CUSTOMER
C
giiven below:
HANDSE
ETS
etCode SetN
Name Touch
hScreen Pho
Se
oneCost
N1
1
a 2G
Nokia
N
500
00
N2
2
a 3G
Nokia
Y
800
00
B1
kBerry
Black
N
140
000
CUSTOM
MER
CustNo
o
SetNo
C
CustAddress
1
N2
D
Delhi
2
B1
M
Mumbai
3
N2
M
Mumbai
4
N1
K
Kolkata
5
B1
D
Delhi
With refe
erence to these
e tables, Write commands in
n SQL for (i) an
nd (ii) and outp
put for (iii)
below:
An
ns.
(i)
ess and corressponding SetN
Name for each customer.
Display the CusttNo, CustAddre
(ii)
f each custom
mer who uses a Nokia hand
dset.
Display the Custtomer Details for
(iii)
select SetNo, SetName
om HANDSETS
S, CUSTOMER
fro
wh
here SetNo = SetCode
an
nd CustAddresss = 'Delhi';
(i)
SE
ELECT CustNo, CustAddress, SetName FRO
OM CUSTOME
ER, HANDSETS
S Where SetNo
o
= SetCode;
(1 m
mark for corre
ect use of SELECT and FROM
M)
(1 mark for co
orrect use of W
WHERE clause )
(ii)
SE
ELECT * FROM CUSTOMER, HANDSETS W
WHERE SetNo = SetCode and
d setname like
e
"N
Nokia%";
(1 m
mark for corre
ect use of SELECT and FROM
M)
(1 mark for co
orrect use of W
WHERE clause )
(iii)
setno
N2
2
B1
(1 mark fo
or each correct line of output)
7
(a))
es e-business im
mprove custom
mer satisfaction
n- Write one p
point.
How doe
An
ns.
E-businesss improve cusstomer satisfacction in the fol lowing ways:
• Redu
ucing transactio
on and other costs
c
• Imple
ementing the supply
s
chain efficiently
e
• Imprroving custome
er service
• Incre
easing efficienccy
• Proviiding access to
o international markets
(1 Mark for anyy correct point)
12
Sample
e Question Paaper: I
(b))
enefited from e-governance?
e
? Write 2 pointts.
How has our society be
An
ns.
The follow
wing are the ways
w
in which our
o society hass been benefitted from e-govvernance:
• Imprroved the administrative mac
chinery and de
elivery of servicces
• Redu
uced the waitin
ng time before the work is do
one
each for any 2 correct points)
( 1 Mark e
(c)
e controls on a form for the
Vijayan works
w
for the Customs
C
Depa
artment. He w
wishes to create
e
following
g functions. Ch
hoose appropriate controls frrom Text box, Label, Option button, Check
k
box, List box, Combo box,
b
Command
d button and w
write in the thirrd column.
An
ns.
SN
No
Control used to:
1
Enter lasst name
2
Enter Ge
ender
3
Choose City
C from the llist of cities
4
Submit Form
F
C
Control
SNo
ntrol used to::
Con
Control
1
er last name
Ente
Text Fielld
2
er Gender
Ente
Option B
Button
3
oose City from
m the list of citie
es
Cho
List Box or Combo Boxx
4
bmit Form
Sub
Button (C
Command)
( ½ Mark e
each for each ccorrect answerr)