Sample Paper – 2011
Class – XII
Subject - Informatics Practices
Time : 3 hours Max Marks:50
Q1. Answer the following questions.
(a) Expand the following terms: (i) ODF (ii) GPL 2
(b) A School would like to go in for network of all the computers. Which topology would you recommend and why? 2
(c) Differentiate between <P> and <Br>. 2
(d) Write HTML code to set background image and change color of a document . 2
(e) Rewrite the following program code using for loop: 2
int i = 1, sum = 0;
while (i < 10)
{ sum += i;
i += 2;
}
Q2. Answer the following questions:
(a) What is E R modelling? Identify the entities ,attributes and relationship in the following scenario: 2
“A person can be Male or Female.”
(b) What is XML? How is it different from HTML? 1
(c) Define the following terms.
(i) Multi –valued Attribute (ii) DDLC 2
(d) Name MYSQL command to : 2
1) display the structure of table
2) change the widthe of a column
(e) What are column constraints ? Explain any two with example. 2
Q3. Answer the following questions:
(a) Which MySQL command helps you to see existing databases? 1
(b) What is an iterative statement ? Name any two iterative statements provided in JAVA. 2
(c) What is primary key? How is it different from candidate key? Explain with the help of suitable example. 2
(d) Write the equivalent switch case for the following code : 3
If (num1 = =1 )
jTextField1.setText(“Number is one”);
else If (num1 = =2 )
jTextField1.setText(“Number is two”);
else If (num1 = =3 )
jTextField1.setText(“Number is three”);
else
jTextField1.setText(“Number is more than three”);
(e) What are the use of the following tags- <UL>, <HEAD>, <SUP>, <P> 2
Q4. Answer the following questions:
(a) What is Inheritance? Name the inheritance types which is not supported by Java. 1
(b) What are the differences between hardware, software and firmware? 1
(c) What is Selection Statement? Describe each statement with syntax? 1
(d) Rewrite following while loop into a for loop 2
int stripes =0;
while(stripes<=13)
if(stripes%2==2)
{
System.out.println(“colour code red”);
}
else
{
System.out.println(“colour code blue”);
}
System.out.println(“new stripe”);
stripes =stripes +1;
}
(e) The following code has some error(s). Rewrite the correct code underlining all the corrections made. 2
int y=3;
switch(y);
{ case 1: System.out.print(“Yes its One”);
case >2: System.out.println(“Yes its more than Two”);
break;
case else: System.out.print(“Invalid Number):
(f) What is mean by implicit and explicit type conversion ? 1
(g) Write code to obtain list of selected items from a list namely List1. 1
(h) What are the actual and formal parameters of a method? 1
Q5. Answer the following questions:
(a) The following code has some error(s). Rewrite the correct code underlining all the corrections made. 2
int p, q =15;
p= = q + 15;
if (p= =q)
{ jTextField1.setText(“p and q are unequal”);
jTextField2.setText(“they are not equal”); break;
}
(b) Rewrite following for loop into a while loop 2
int sum=0;
for(int i =1;i<=5;++i)
{
sum=sum+c;
}
(c) Rewrite the following code using for loop. 2
int i=0;
while(++i<20)
{ if( i==8)
break;
System.out.println(i++);
}
(d) What will be the value of s after executing the following code? 2
double i,sum=2
for(i=3;i<8;++i)
{ if(i%4= =0)
{ break;
sum=Math.pow(sum,i);
}
else
sum+=i/2;
}
(e) What is communication channel? What choices do you have while choosing a communication channel for a network? 2