0% found this document useful (0 votes)
95 views20 pages

CBSE Class 12 Informatics Practices Question Paper 2019 With Solutions

Uploaded by

suarkaball
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)
95 views20 pages

CBSE Class 12 Informatics Practices Question Paper 2019 With Solutions

Uploaded by

suarkaball
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/ 20

CBSE Class 12

Informatics Practices
Previous Year Question Paper 2019
Series: BVM 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.
III. Q.2 and Q.4 have to be answered with respect to Java Language.
IV. Q.3, Q.5 and Q.6 have to be answered with respect to MySQL.

1. (a) Write the functions of the following pieces of network hardware:

Class XII Informatics Practices www.vedantu.com 1


2 Marks
(i) Modem
(ii) Switch
Ans: (i) MODEM:- Modulator Demodulator converts the digital signals to analog
signals and vice versa.
(ii) Switch:- Switch helps in connecting different nodes to form a network and
forward the received packet to the intended node.
(b) Write two ways used to make sure that the data is secure and is available
only to the intended and authorized persons in a network. 2 Marks
Ans: Ways to ensure data is secure and is available to only intended and
authorized persons in network are:
● Assigning the file permissions so other user have limited access.
● Securing the file with password
(c) Expand TCP/IP. Write the purpose of TCP/IP in communication of data
on a network. 2 Marks
Ans: TCP/IP stands Transmission Control Protocol/Internet Protocol
TCP/IP is used to manage the data transmission between two devices over the
internet.
(d) Expand the following terms : 2 Marks
(i) MAC Address
(ii) ODF
Ans: (i) MAC Address: Media Access Control Address
(ii) ODF: Open Document Format
(e) Explain in brief any one freedom offered by Open Source Software. Write
one example for each of the following: 2 Marks
(i) An Open Source Operating System
(ii) An Open Source Office Suite

Class XII Informatics Practices www.vedantu.com 2


Ans: Open Source Software allows user to modify the software as per his/her
needs.
(i) An Open Source Operating System: Linux
(ii) An Open Source Office Suite: Adobe Open office

2.(a) Write the data type of variables that should be used to store the
following in Java: 1 Mark
(i) Sales amount (of Sales) achieved by a Sales Person
(ii) Roll Number of Student
Ans: (i) int/float/double
(ii) int/long
(b) Distinguish between isSelected() and setSelected() methods of Java with
the help of example. 1 Mark
Ans: isSelected() returns a bool value to tell if the radio button is selected or not
while setSelected() is used to check the radio button or uncheck it.
Example: rbutton.setSelected(true); //rbutton is selected
boolean b = rbutton.isSelected(); //will tell if rbutton is selected
(c) What will be displayed in jTextField1 and jTextField2 when the following
code is executed? 2 Marks
int x,y,z,t;
x = 3;
y = 8;
z = x+y/8;
t = z++;
jTextField1.setText(""+z);
jTextField2.setText(""+t);

Class XII Informatics Practices www.vedantu.com 3


Ans: jTextField1 = 4
jtextField2 = 5
Or
What will be displayed in jTextField1 and jTextField2 when the following
code is executed? 2 Marks
int x,y,z,t;
t = 3;
z = 0;
do {
z = z+1;
} while (t>3);
jTextField1.setText(""+z);
jTextField2.setText(""+t);
Ans: jTextField1 = 1
jTextField2 = 3
(d) The following HTML code has error(s). Rewrite the correct code
underlining corrections made. 2 Marks
<ol type="A" begin="4">
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
<end>
Ans: <ol type="A" start="4">
<li>List item 1</li>
<li>List item 2</li>

Class XII Informatics Practices www.vedantu.com 4


<li>List item 3</li>
</ol>
Or
Expand XML. For what purpose is XML used? 2 Marks
Ans: XML stands for Extensible Markup Language
XML is used to describe and store the data.
(e) Write the output that will be displayed on jLabel1 and jLabel2. 2 Marks
String a,b,c,d,x;
a= "Keep";
b="your";
c="surroundings";
d="clean";
int e = b.length()/4+d.length()*2;
x=b+c+d;
x=a.concat(x);
jLabel1.setText("The value of e = "+e);
jLabel2.setText(x.toUpperCase());
Ans: jLabel1 = The value of e = 11
jLabel2 = KEEPYOURSURROUNDINGSCLEAN
(f) Write the output displayed in jTextField1 and jTextField2 when the
following code is executed: 2 Marks
char code;
int z;
z = 0;
code = ‘w’;

Class XII Informatics Practices www.vedantu.com 5


switch (code)
{
case ‘w’ : z = z+1;
case ‘r’ : z = z+2;
break;
case ‘s’ : z=z +3;
break;
default : z = z+4;
}
jTextField1.setText(""+z);
jTextField2.setText(""+code);
Ans: jTextField1 = 3
jTextField2 = w
Or
What happens if break statement is omitted with a case in a switch
statement? 2 Marks
Ans: If ‘break’ statement is omitted with a case in a switch statement then the
control of the program will move to the next case statement instead of exiting
the switch statement.

3.(a) In CHAR(10) and VARCHAR(10), what does the number 10 indicate?


1 Mark
Ans: Number 10 indicates the maximum size of the attribute.
(b) ‘Employee’ table has a column named ‘CITY’ that stores city in which
each employee resides. Write SQL query to display details of all rows except
those rows that have CITY as ‘DELHI’ or ‘MUMBAI’ or ‘CHANDIGARH’.
1 Mark

Class XII Informatics Practices www.vedantu.com 6


Ans: SELECT * FROM Employee WHERE CITY NOT IN (“DELHI”,
“MUMBAI”, “CHANDIGARH”);
(c) Consider the following table : 1 Mark
Table: RESULTS

STUDENTID NAME EXAMID SCORE

10 Leena 1 20

10 Leena 2 25

11 Samarth 1 30

11 Samarth 2 35

12 Jai 1 14

12 Jai 2 15

14 Shoaib 1 30

14 Shoaib 2 12

Abhay wants to know the number of students who took the test. He writes
the following SQL statement to count STUDENTID without duplicates.
However the statement is not correct. Rewrite the correct statement.
2 Marks
SELECT DISTINCT(COUNT STUDENTID) FROM RESULTS;
Ans: SELECT COUNT(DISTINCT STUDENTID) FROM RESULTS;
(d) Aman has used the following SQL command to create a table ‘stu’ :
CREATE TABLE stu
(
id INTEGER,
name VARCHAR(100)
);

Class XII Informatics Practices www.vedantu.com 7


Then, Aman enters the following SQL statements to enter 4 rows :
INSERT INTO stu VALUES (1, "abc");
INSERT INTO stu VALUES (2, "abc");
INSERT INTO stu VALUES (3, "bcd");
Write the output that will be produced by the following SQL statement:
2 Marks
SELECT name, Count(*)
FROM stu
GROUP BY name;
Ans: Output:

Name Count(*)

abc 2

bcd 1

(e) Write SQL statement to add a column ‘‘COUNTRY’’ with data type and
size as VARCHAR(70) to the existing table named ‘‘PLAYER’’. Is it a DDL
or DML or TCL command? 2 Marks
Ans: ALTER TABLE PLAYER ADD COLUMN COUNTRY VARCHAR(70);
It is a Data Definition Language (DDL) command.
(f) Table Student has the columns RNO and SCORE. It has 3 rows in it.
Following two SQL statements were entered that produced the output
(AVG(SCORE) as 45 and COUNT(SCORE) as 2) : 2 Marks
(i) AVG(SCORE)
(ii) COUNT(SCORE)
Data in SCORE column is same in two rows. What data is present in the
SCORE column in the three rows ?
Ans: SCORE

Class XII Informatics Practices www.vedantu.com 8


45
45
NULL

4.(a) What will displayed in jTextField1 when the following code is executed?
1 Mark
int x=3, y=6, z=0;
if(x>3)
z = z + 1;
if((x<4)&&(y>6))
z = z + 2;
if(x>2 && y>=6)
z = z + 3;
if((x<3) || (y>6))
z = z + 4;
jTextField1.setText(""+z);
Ans: jTextField1 = 3
(b) Rewrite the following code after correcting errors. Underline the
corrections made. 2 Marks
int a, c;
30 = c;
4 = a;
while do (c>10)
{
a = = a + c;

Class XII Informatics Practices www.vedantu.com 9


c = c-5;
}
Ans: int a, c;
c = 30;
a = 4;
while(c>10)
{
a = a + c;
c = c-5;
}
(c) How many times will the following loop execute? 2 Marks
int K = 7;
int I = -2;
do
{
I=I+2;
K=K-1;
}
while (I <= K);
Ans: Loop will be executed 4 times.
Or
How many times will the following loop execute ? 2 Marks
for (i = 2; i <=5;i++)
{

Class XII Informatics Practices www.vedantu.com 10


z = i;
}
Ans: Loop will be executed 4 times.
(d) Write the output in jTextField1 when the following code is executed:
2 Marks
int k, n, sum = 0;
for (k = 2; k <=5; k++)
{
n = k - 2 * 3;
sum = sum + n;
}
jTextField1.setText(""+sum);
Ans: jTextField1 = -10
Or
Write the output in jTextField1 when the following code is executed:
2 Marks
int k, n =0, sum = 0;
k = 2;
while (k<=5)
{
n = k +4;
sum = sum + n;
k=k+2;
}
jTextField1.setText(""+n);

Class XII Informatics Practices www.vedantu.com 11


Ans: jTextField1 = 8
(e) Write the values of i and k after execution of the following code: 2 Marks
int i,j,k;
i = 2;
j = 8;
k = 6;
do
{
i = i + 4;
k = k + i;
}
while (i < j);
Ans: i = 10
k = 22
(f) Ms. Supriya works as a programmer in a courier company, ‘‘ABC
Packaging and Shipping Service’’ where she has designed a software to
compute charges to be paid by the customers.
● Weight (in grams) of the parcel is entered by the user.
● Any one Category of parcel out of A/B/C is chosen by the user.
● Based on the Category selected, Transportation Charges (per gram)
are computed according to the following criterion:

Category Transporation Charges Per Gram

A ₹ 2.00

B ₹ 3.00

C ₹ 5.00

Class XII Informatics Practices www.vedantu.com 12


● Insurance Charges is a flat ₹ 80.00 per parcel.
● Total Transportation Charges = Transportation Charges Per gram *
Weight in grams (of parcel) entered by the user.
● Total Charges = Total Transportation Charges + Insurance Charges.
Help Ms. Priya in writing the code to do the following :
(i) When Calculate Charges button is clicked, Insurance Charges,
Transportation Charges per gram, Total Transportation Charges and Total
Charges should be calculated and displayed in the respective text fields.
4 Marks
Ans: //Calculate
float wt = 0, tcpergram = 0, ttc = 0, ic = 0, totalc = 0;
wt = Float.parseFloat(jTextField1.getText());
if(jRadioButton1.isSelected())
tcpergram = 2;
else if(jRadioButton2.isSelected())
tcpergram = 3;
else if(jRadioButton3.isSelected())
tcpergram = 5;
ic = 80;
ttc = tcpergram*wt;
totalc = ttc+ic;
jTextField2.setText(“ ”+ic);
jTextField3.setText(“ ”+tcpergram);
jTextField4.setText(“ ”+ttc);
jTextField5.setText(“ ”+totalc);

Class XII Informatics Practices www.vedantu.com 13


(ii) When ‘CLEAR’ button is clicked, all the textfields and radiobuttons
should be cleared. 1 Mark
Ans: //Clear
jTextField1.setText(“ ”);
jTextField2.setText(“ ”);
jTextField3.setText(“ ”);
jTextField4.setText(“ ”);
jTextField5.setText(“ ”);
jRadioButton1.setSelected(false);
jRadioButton2.setSelected(false);
jRadioButton3.setSelected(false);
(iii) When ‘Exit’ button is clicked, the application should close. 1 Mark
Ans: //Exit
System.exit(0);

5. Consider the following table ‘Transporter’ that stores the order details
about items to be transported. Write SQL commands for the statements (i)
to (viii) and write output for SQL queries (ix) and (x).
Table: TRANSPORTER

ORDE DRIVERN DRIVERG TRAVEL DESTINA


ITEM
RNO AME RADE DATE TION

10012 RAM A TELEVISI 2019-04- MUMBAI


YADAV ON 19

10014 SOMNAT FURNITUR 2019-01- PUNE


H SINGH E 12

Class XII Informatics Practices www.vedantu.com 14


10016 MOHAN B WASHING 2019-06- LUCKNO
VERMA MACHINE 06 W

10018 RISHI A REFRIGER 2019-04- MUMBAI


SINGH ATOR 07

10019 RADHE TELEVISI 2019-05- UDAIPUR


MOHAN ON 30

10020 BISHAN B REFRIGER 2019-05- MUMBAI


PRATAP ATOR 02

10021 RAM TELEVISI 2019-05- PUNE


ON 03

(i) To display names of drivers and destination city where TELEVISION is


being transported. 1 Mark
Ans: SELECT DRIVERNAME, DESTINATION FROM TRANSPORTER
WHERE ITEM = “TELEVISION”;
(ii) To display driver names and destinations where destination is not
MUMBAI. 1 Mark
Ans: SELECT DRIVERNAME, DESTINATION FROM TRANSPORTER
WHERE DESTINATION <> “MUMBAI”;
(iii) To display the names of destination cities where items are being
transported. There should be no duplicate values. 1 Mark
Ans: SELECT DISTINCT(DESTINATION) FROM TRANSPORTER;
(iv) To display details of rows that have some value in DRIVERGRADE
column. 1 Mark
Ans: SELECT * FROM TRANSPORTER WHERE DRIVERGRADE IS NOT
NULL;
(v) To display names of drivers, names of items and travel dates for those
items that are being transported on or before 1st April 2019. 1 Mark
Ans: SELECT DRIVERNAME, ITEM, TRAVELDATE FROM
TRANSPORTER WHERE TRAVELDATE <= “2019-04-01”;

Class XII Informatics Practices www.vedantu.com 15


(vi) To display the number of drivers who have ‘MOHAN’ anywhere in their
names. 1 Mark
Ans: SELECT COUNT(*) FROM TRANSPORTER WHERE DRIVERNAME
LIKE “%Mohan%”;
(vii) To display the names of drivers, item names and travel dates in
alphabetic (ascending) order of driver names. 1 Mark
Ans: SELECT DRIVERNAME, ITEM, TRAVELDATE FROM
TRANSPORTER ORDER BY DRIVERNAME;
(viii) To display names of drivers whose names are three characters long.
1 Mark
Ans: SELECT DRIVERNAME FROM TRANSPORTER WHERE
DRIVERNAME LIKE “_ _ _”;
(ix) SELECT ITEM, COUNT(*) FROM TRANSPORTER GROUP BY
ITEM HAVING COUNT(*) >1; 1 Mark
Ans: ITEM COUNT(*)
TELEVISION 3
REFRIGERATOR 2
(x) SELECT MAX(TRAVELDATE) FROM TRANSPORTER WHERE
DRIVERGRADE = ‘A’; 1 Mark
Ans: MAX(TRAVELDATE)
2019-04-19

6.(a) Mr. Sen has to create a table named ‘Employee’ with Columns to store
EmpID, Name, Designation, Age and Salary. EmpID is the Primary key and
Name cannot be NULL.
Some of the rows that will be inserted are shown below.
101 Smita Kumar Secretary 28 39500.00
102 Mani Scott Programmer 32 45300.00

Class XII Informatics Practices www.vedantu.com 16


103 Firdaus Ali Programmer II 45 67500.00
Write SQL query to create the above table with appropriate data types and
sizes of columns. 2 Marks
Ans: CREATE TABLE Employee(
EmpID int PRIMARY KEY,
Name varchar(20) NOT NULL,
Designation varcharchar(20),
Age int,
Salary decimal(8,2)
);
Or
Ms. Rajshri is the Class Teacher of Class XII. She wants to create a table
named ‘Student’ to store marks in different subjects of her class. Identify
any 4 columns for the table along with their suitable data types. 2 Marks
Ans: Column name Data type
Admission no integer
Name varchar
Marks1 float
Marks2 float
(b) Consider the following tables PARTICIPANT and ACTIVITY and
answer the questions that follow :
Table: PARTICIPANT

ADMNO NAME HOUSE ACTIVITYCODE

6473 Kapil Shah Gandhi A105

7134 Joy Mathew Bose A101

Class XII Informatics Practices www.vedantu.com 17


8786 Saba Arora Gandhi A102

6477 Kapil Shah Bose A101

7658 Faizal Ahmed Bhagat A104

Table: ACTIVITY

ACITIVTYCODE ACTIVITYNAME POINTS

A101 Running 200

A102 Hopping bag 300

A103 Skipping 200

A104 Bean Bag 250

A105 Obstacle 350

When the table ‘‘PARTICIPANT’’ was first created, the column ‘NAME’
was planned as the Primary key by the Programmer. Later a field ADMNO
had to be set up as Primary key. Explain the reason. 2 Marks
Ans: Programmer had to change the primary key from Name to Admno because
two participants can have same names (such as Kapil Shah) but both participants
will not have same Admno.
Or
Identify data type and size to be used for column ACTIVITYCODE in table
ACTIVITY. 2 Marks
Ans: Char is the data type for column ACTIVITYCODE and 4 is the size.
(c) With reference to the above given tables (in Q6 b), write commands in
SQL for (i) to (iii).
(i) To display Activity Code along with number of participants participating
in each activity (Activity Code wise) from the table Participant. 2 Marks

Class XII Informatics Practices www.vedantu.com 18


Ans: SELECT ACTIVITYCODE, COUNT(*) FROM PARTICPANT ORDER
BY ACTIVITYCODE;
Or
How many rows will be there in Cartesian product of the two tables in
consideration here? 2 Marks
Ans: 5*5 = 25 rows in the cartesian product.
(ii) To display Names of Participants, Activity Code, Activity Name in
alphabetic ascending order of names of participants. 2 Marks
Ans: SELECT NAME, P.ACTIVITYCODE, ACTIVITYNAME FROM
PARTICIPANT P, ACTIVITY A WHERE P.ACTIVITYCODE =
A.ACTIVITYCODE ORDER BY NAME;
(iii) To display Names of Participants along with Activity Codes and Activity
Names for only those participants who are taking part in Activities that have
‘bag’ in their Activity Names and Points of activity are above 250. 2 Marks
Ans: SELECT NAME, P.ACTIVITYCODE, ACIVITYNAME FROM
PARTICIPANT P, ACTIVITY A WHERE P.ACTIVITYCODE =
A.ACTIVITYCODE AND ACTIVITYNAME LIKE “%bag %” AND POINTS
> 250;

7.(a) How does e-governance help in increasing Accountability


(answerability of the Government to the people)? Write 2 points. 2 Marks
Ans: e-Governance helps in following ways:
● It provides transparency towards government policies, processes, progress.
● It helps in reducing corruption as employee and consumer contact is
reduced.
(b) Write 2 precautions to be followed while doing Online shopping. 1 Mark
Ans: Precautions to be followed while doing Online Shopping:
● Purchase from only secured and trusted websites.
● Check for product details carefully and reviews of the website.

Class XII Informatics Practices www.vedantu.com 19


(c) Ms. Deepika of ABC School is creating a form for a Summer Camp
application. Help her to choose the most appropriate controls from ListBox,
ComboBox, TextField, TextArea, RadioButton, CheckBox, Label and
Command Button for the following entries: 2 Marks

S.No Function

1 Let the user enter NAME of student

2 Let the user enter MOBILE NUMBER of student

3 Let the user choose one TSHIRT size out of the categories :
XL / L / M / S
4 Let the user select Activities out of Rock Climbing/ Mountain
Biking/Zip Lining/Night Hike. More than one activity may be chosen.

Ans: TextBox for Name of the student and Mobile number, RadioButton for
selecting Tshirt size and CheckBox/ListBox for selecting Activities.

Class XII Informatics Practices www.vedantu.com 20

You might also like