0% found this document useful (0 votes)
36 views17 pages

CBSE Class 12 Informatics Practices Question Paper 2011 With Solutions

The document provides a previous year question paper for Class 12 Informatics Practices from 2011. The paper contains 7 questions with various subparts testing concepts related to networking, databases, Java programming and object-oriented programming. Students are required to write answers for all questions in the paper within the allotted time of 3 hours.

Uploaded by

Yashika Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views17 pages

CBSE Class 12 Informatics Practices Question Paper 2011 With Solutions

The document provides a previous year question paper for Class 12 Informatics Practices from 2011. The paper contains 7 questions with various subparts testing concepts related to networking, databases, Java programming and object-oriented programming. Students are required to write answers for all questions in the paper within the allotted time of 3 hours.

Uploaded by

Yashika Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

CBSE Class 12

Informatics Practices
Previous Year Question Paper 2011
Series: SOS Code no. 90

● Please check that this question paper contains 11 printed pages.


● Code number given on the right hand side of the question paper should be
written on the title page of the answer-book by the candidate.
● Please check that this question paper contains 7 questions.
● Please write down the Serial Number of the question before
attempting it.
● 15 minute time has been allotted to read this question paper. The
question paper will be distributed at 10.15 a.m. From 10.15 a.m. to 10.30
a.m., the students will read the question paper only and will not write
any answer on the answer-book during this period.

INFORMATICS PRACTICES

Time Allowed: 3 hours Maximum Marks: 70


Instructions:
I. All questions are compulsory.
II. Answer the questions after carefully reading the text.

1. (a) Ms. Kant Sengupta wants to prevent unauthorized access to/from his
company’s local area network. Write the name of a system
(software/hardware), which he should install to do the same. 1 Mark

Class XII Informatics Practices www.vedantu.com 1


Ans: Firewall
(b) Seven Brothers Fashion Inc. is a fashion company with design unit and
market unit 130 meters away from each other. The company recently
connected their LANs using ethernet cable to share the stock related
information, But after joining their LANs they are not able to share the
information due to loss of signal in between. Which device out of the
following should you suggest to be installed for a smooth communication?
1 Mark
(i) Modem
(ii) Repeater
(iii) UPS
Ans: Repeater
(c) Which of the following is not a feature of Networking? 1 Mark
(i) Resource Sharing
(ii) Reliability
(iii) Uninterrupted Power Supply
(iv) Reduced cost
Ans: Uninterrupted Power Supply
(d) Name any two Indian scripts included in Unicode. 1 Mark
Ans: Devnagri and Bengali.
(e) Ms. Vidya Chauhan is confused between Proprietary Software and Open
Source Software. Mention at least two points of difference to help her
understand the same. 2 Marks
Ans: The difference between Proprietary software and Open Source Software:

Proprietary Software Open Source Software

The source code of these softwares is The source code of these softwares is
kept hidden from the end users. available for the end users and can be

Class XII Informatics Practices www.vedantu.com 2


modified as per one’s requirement.

To modify the software you will need No permissions from owner are
a license with special permissions required in the form of the license.
granted from the owner.

(f) Identify the type of Topology from the following:


(i) In it, each node is connected with the help of a single co-axial cable.
(ii) In it, each node is connected with the help of independent cable with the
help of a central switching (communication controller). 2 Marks
Ans: (i) Bus Topology
(ii) Star Topology
(g) Define the following with reference to Threats of Network Security:
2 Marks
(i) Worm.
(ii) Trojan Horse
Ans: Worm:
● Makes its own copies without any user’s command.
● It consumes a large space on disk and many times fails other processes to
run.
Trojan Horse:
● Causes harm to the system like crashes it or freezes it.
● Steals important information while you think it is helping in some task.

2.(a) While working in Netbeans, Mr. Khorana wants to display 'Pass' or


'Needs to Reappear' message depending on the marks entered in jTextField.
Help her to choose the more appropriate statement out of 'If statement' and
'Switch statement'. 1 Mark
Ans: IF statement

Class XII Informatics Practices www.vedantu.com 3


(b) How one can make a Text Field uneditable on a Frame? 1 Mark
Ans: By setting the setEditable() false for the text field.
Example: jTextField1.setEditable(False);
(c) Which HTML tags are used for making a table and adding rows in
HTML document? 1 Mark
Ans: <table> to create a table and <tr> to add a row.
(d) How is <OL> tag different from <UL> tag of HTML? 1 Mark
Ans: <OL> tag is used to create a numbered/ordered list while <UL> tag is used
to create a bulleted/unordered list.
(e) What will be the value of P and Q after execution of the following code?
2 Marks
int P, Q=100;
for (P=10; P<=12; P++)
{
Q += P ;
}
JOptionPane.showMessageDiaog (this, "P:"+P+" Q:"+Q+"");
Ans: P:13 Q:133
(f) Differentiate between XML and HTML. 2 Marks
Ans: The difference between XML and HTML:

XML HTML

This script is dynamic in nature. This script is static in nature.

It is used to store, display and transfer It is used to display the pre-written


the data. content on the webpage.

Class XII Informatics Practices www.vedantu.com 4


(g) Write Java code that takes the cost of a pencil from jTextField1 and
number of pencils from jTextField2 and calculates total amount as
cost*number to be displayed in jTextField3 and 20% service tax out of total
amount in jTextField4. 2 Marks
Ans: float cost = Float.parseFloat(jTextField1.getText( ));
int n = Integer.parseInt (jTextField2.getText( ));
float amount = cost * n;
jTextField3.setText(amount + "");
jTextFitlld4.setText (amount * 0.20+ “ ”);

3.(a) Write MySql command that will be used to open an already existing
database "CONTACTS. 1 Mark
Ans: USE CONTACTS;
(b) The Doc_name Column of a table Hospital is given below: 2 Marks

Doc_name

Avinash

Hariharan

Vinayak

Deepak

Sanjeev

Based on the information, find the output of the following queries:


(i) SELECT doc_name FROM Hospital WHERE doc_name like "%v";
Ans: Sanjeev
(ii) SELECT doc_name FROM Hospital WHERE doc_name like '%e%';
Ans: Deepak

Class XII Informatics Practices www.vedantu.com 5


Sanjeev
(c) A table "Transport" in a database has degree 3 and cardinality 8. What
is the number of rows and columns in it? 2 Marks
Ans: Rows = 8
Columns = 3
(d) Define a class with reference to Object Oriented Programming. 1 Mark
Ans: A class is a user defined data type which encapsulates the data members and
member functions in it under one name.
(e) An employee_ld consisting of 5 digits is stored in a string variable
strEmpId. Now Mr.Deb wants to store this Id in Integer type of variable
IntEmpId. Write Java statement to do this. 1 Mark
Ans: int IntEmpId = Integer.parseInt(strEmpId);
(f) Sarthak, a student of class XII, created a table "Class". Grade is one of
the columns of this table. To find the details of students whose Grades have
not been entered, he wrote the following MySql query, which did not give
the desired result: 2 Marks
SELECT * FROM Class WHERE Grade ="Null";
Help Sarthak to run the query by removing the errors from the query and
write the correct query.
Ans: SELECT * FROM Class WHERE Grade IS NULL;

4.(a) What will be displayed in of jTextField1 after executing the following


code? 2 Marks
int m = 16;
m = m+1;
if (m<15)
jTextField1.setText(Integer.toString(m));
else

Class XII Informatics Practices www.vedantu.com 6


jTextField1.setText(Integer.toString(m+15));
Ans: 32
(b) Rewrite the following program code using a Switch statement: 2 Marks
if (code ==1)
Month = "January";
else if (code ==2)
Month = "February";
else if (code==3)
Month = "March";
else if (code==4)
Month = "April";
else
Month = "No Match";
Ans: switch(code)
{
case 1: Month = "January";
break;
case 2: Month = "February";
break;
case 3: Month = "March";
break;
case 4: Month = "April";
break;
default: Month = "No Match";

Class XII Informatics Practices www.vedantu.com 7


}
(c)What will be displayed in jTextArea1 after executing the following
statement? 1 Mark
jTextArea1.setText ("cbse\nFinal_Exam\tIP");
Ans: cbse
Final_Exam IP
(d) The following code has some errors(s). Rewrite the correct code
underlining all the corrections made: 2 Marks
Int k=2;sum = 0; //Declaring k and sum as Integer
{
sum = k ;
k+=2;
}
while (k=<20) ;
jTextField1(Integer.tostring(sum));
Ans: int k=2,sum = 0; //Declaring k and sum as Integer
do{
sum = k ;
k+=2;
}
while (k=<20);
jTextField1(Integer.toString(sum));
(e) Given a String object namely 'subject' having value as “123” stored in it.
What will be result of the following? 1 Mark
JOptionPane.showMessageDialoge (null, " " + (subject.length( ) +
Integer.parseInt(subject)));

Class XII Informatics Practices www.vedantu.com 8


Ans: 126
(f) The following code has some error(s). Rewrite the correct code
underlining all the corrections made: 2 Marks
int Sum=0, Step=5 ;
int I ;
for (i = 0, i =<5, i++)
{
Step+=5,
Sum+=Step;
}
jTextAreal.showText(" "+Sum);
Ans: int Sum=0, Step=5 ;
int i;
for (i = 0; i =<5; i++)
{
Step+=5;
Sum+=Step;
}
jTextAreal.setText(" "+Sum);
(g) Mr. Radhey Shyam Bansal the owner of the Kiddi Land Enterprises has
asked his programmer Ekta to develop the following GUI in Netbeans:

Class XII Informatics Practices www.vedantu.com 9


Mr. Bansal accepts payment through three types of credit cards The
discount is given according to the following scheme:

Type Of Card Discount

Platinum 20% of amount

Gold 15% of amount

Silver 10% of amount

If the Bill amount is more than Rs, 25,000, then the customer gets an
additional discount of 5%. Write Java code for' the following:
(i) To assign Additional Discount as 0 (jTextField4) and Net Amount as 0
(jTextField5). Also set them as un-editable. 1 Mark
Ans: jTextField4.setText ("0") ;
jTextField5.setText ("0") ;
jTextField4.setEditable(false) ;
jTextField5. setEditable(false) ;
(ii) [When "Calculate Discount" (jButton1) is clicked]

Class XII Informatics Practices www.vedantu.com 10


To calculate discount as per the given criteria and display the same in
jTextField3
To assign Additional Discount (jTextField4) as 5% of amount (jTextField2)
as per the above condition.
To enable "Calculate Net Amount" (jButton2) button 2 Marks
Ans: //Calculate Discount
double discount = 0.0 ;
double billAmount = Double.parseDouble(jTextField2.getText());
if(jRadioButton1.isSelected())
discount = 0.20;
if(jRadioButton2.isSelected())
discount = 0.15;
if(jRadioButton3.isSelected())
discount = 0.10;
jTextField3.setText(billAmount * discount+“ ”) ;
if (billAmount > 25000)
jTextField4.setText (billAmount*0.05+“ ”);
jButton2.setEnabled(true) ;
(iii) [When "Calculate Net Amount" (jButton2) button is clicked]
To calculate Net Amount as [TotalCost(jTextField2) - Discount
(jTextField3) - Additional Discount (jTextField4)]
To display the Net Amount in jTextField5 2 Marks
Ans: //Calculate Net Amount
doube netAmount = Double.parseDouble(jTextField2.getText()) -
Double.parseDouble(jTextField3.getText()) -

Class XII Informatics Practices www.vedantu.com 11


Double.parseDouble(jTextField4.getText()) ;
jTextField5.setText(netAmount + " ") ;

5.(a) What is the purpose of ALTER TABLE command in MySql? How is it


different from UPDATE command? 2 Marks
Ans: ALTER TABLE is used to change the dimensions of the table.
ALTER TABLE is used to modify the dimension of the table while UPDATE is
used to modify the data of the table.
(b) Table Employee has 4 records and Table Dept has 3 records in it. Mr.
Jain wants display all information stored in both of these related tables. He
forgot to specify equi-join condition in the query, How many rows will get
displayed on execution of this query? 1 Mark
Ans: 12
(c) Consider the EXAM given below. Write commands in MySql for (i) to
(iv) and output for (v) to (vii).
Table: EXAM

No Name Stipend Subject Average Division


1 Karan 400 English 68 FIRST
2 Aman 680 Mathematics 72 FIRST
3 Javed 500 Accounts 67 FIRST
4 Bishakh 200 Informatics 55 SECOND
5 Sugandha 400 History 35 THIRD
6 Suparna 550 Geography 45 THIRD

(i) To list the names of those students. who have obtained Division as FIRST
in the ascending order of NAME. 1 Mark
Ans: SELECT Name FROM EXAM WHERE Division = 'FIRST' ORDER BY
Name;
(ii) To display a report listing NAME, SUBJECT and Annual stipend
received assuming that the stipend column has monthly stipend. 1 Mark

Class XII Informatics Practices www.vedantu.com 12


Ans: SELECT Name, Subject, Stipend*12 AS Annual Stipend FROM EXAM;
(iii) To count the number of students, who have either Account or
Informatics as Subject. 1 Mark
Ans: SELECT COUNT(*) FROM EXAM WHERE SUBJECT IN ('Accounts',
'Informatics');
(iv) To insert a new row in the table EXAM: 1 Mark
6,“Mohan”, 500, “English”, 73, “SECOND”;
Ans: INSERT INTO EXAM VALUES (6, “Mohan”, 500, “English”, 73,
“SECOND”);
(v) SELECT AVG(Stipend) FROM EXAM WHERE DIVISION =
"THIRD"; 1 Mark
Ans: AVG(Stipend)
475
(vi) SELECT COUNT(DISTINCT Subject) FROM EXAM; 1 Mark
Ans: Count(Distinct Subject)
6
(vii) SELECT MIN (Average) FROM EXAM WHERE Subject = "English";
1 Mark
Ans: MIN(Average)
68

6.(a) Write a MySql command for creating a table "BANK" whose structure
is given below: 2 Marks
Table: BANK

Field Name Datatype Size Constraint


Acct_number Integer 4 Primary key
Name Varchar 3

Class XII Informatics Practices www.vedantu.com 13


BirthDate Date
Balance Integer 8 Not Null

Ans: CREATE TABLE BANK(


Acct_number Integer(4) PRIMARY KEY,
Name Varchar(3),
BirthDate Date,
Balance Integer(8) NOT NULL
);
(b) In a database there are two tables "ITEM" and "CUSTOMER" as
shown below:
Table: ITEM
ID ItemName Company Price
1001 Moisturiser XYZ 40
1002 Sanitizer LAC 35
1003 Bath Soap COP 25
1004 Shampoo TAP 95
1005 Lens Solutions COP 350

Table: CUSTOMER
C_ID CustomerName City ID
01 Samridhh Ltd New Delhi 1002
05 Big Line Inc Mumbai 1005
12 97.8 New Delhi 1001
15 Tom N Jerry Bangalore 1003

Write SQL queries for the following :


(i) To display the details of Item, whose Price is in the range of 40 and 95
(Both values included). 1 Mark
Ans: SELECT * FROM ITEM WHERE Price BETWEEN 40 AND 95;

Class XII Informatics Practices www.vedantu.com 14


(ii) To display the CustomerName. City from table Customer, and
ItemName and Price from table item, with their corresponding matching 10.
2 Marks
Ans: SELECT CustomerName, City, ItemName, Price FROM CUSTOMER
CUST, ITEM WHERE CUST.ID = ITEM.ID;
(iii) To increase the Price of all the Products by 50. 2 Marks
Ans: UPDATE ITEM SET PRICE = PRICE + 50;
(c) In a Database School there are two tables Employee and Dept as shown
below:
Table: Employee

EmpId Name Sal Deptno


T001 Vishakha 34000 10
T001 Mridul 32000 50
T001 Manish 45000 20

Table: Dept

Deptno DName LocationId


10 Lights HH02
20 Dance FF02
30 Production AB01

(i) Identify the foreign key in the table Employee. 1 Mark


Ans: EmpId is the primary key in the table Employee.
(ii) What output, will you get, when an equi-Join query is executed to get the
NAME from Employee table and corresponding DNAME from Dept table?
1 Mark
Ans: Name DName
Vishakha Lights
Manish Dance

Class XII Informatics Practices www.vedantu.com 15


7.(a) Give one social impact of e-Business. 1 Mark
Ans: Social impact:
● It helped saving more money.
Or
● Impact on productivity and inflation.
(b) Write two advantages of e-Learning sites. 1 Mark
Ans: Advantages ofe-Learning sites:
● Allows 24*7 and unlimited access to study material.
● Self-paced learning
(c) Write three important features of e-Governance. Give URL of one of the
commonly used e-Governance portals. 2 Marks
Ans: Impotant features of e-Governance:
● Allows you 24*7 access to the government services.
● Provides easy access to everyone and specially helpful for senior citizens
● A lot of time of government employees and public is saved.
e-Governance portal: www.incometaxindia.gov.in or www.irctc.co.in
(d) Anuja is creating a form for her practical file. Help her to choose most
appropriate controls from List Box, Combo Box, TextField, TextArea, Radio
Button, Check box, Label and Command button for the following entries
from user: 2 Marks
(i) A message "Enter Marks" in front of a Text Field.
Ans. Label
(ii) An input to choose more than one subject from a set of choices.
Ans. ListBox/Check Box
(iii) An input for entering remarks
Ans. TextArea

Class XII Informatics Practices www.vedantu.com 16


(iv) An input for accepting Gender.
Ans. RadioButton/ComboBox

Class XII Informatics Practices www.vedantu.com 17

You might also like