0% found this document useful (0 votes)
18 views15 pages

CBSE Class 12 Informatics Practices Question Paper & Solutions 2015 Delhi Scheme

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)
18 views15 pages

CBSE Class 12 Informatics Practices Question Paper & Solutions 2015 Delhi Scheme

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/ 15

CBSE Class 12

Informatics Practices
Previous Year Question Paper 2015
Series: SSO/1 Code no. 90/1

● Please check that this question paper contains 7 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) A company has 3 departments namely Administrative, Sales,


Production. Out of telephone cable, Optical Fiber, Ethernet Cable, which

Class XII Informatics Practices www.vedantu.com 1


communication medium is best for high speed communication between
departments? 1 Mark
Ans: Optical Fiber
(b) Name one open source Indian operating system. 1 Mark
Ans: Bharat Operating System Software (BOSS)
(c) What is the purpose of a Server in a network? 1 Mark
Ans: A network server helps provide the shared resources to other computers in
a network.
(d) What do the following top level domains signify? 1 Mark
(i) .com
(ii) .org
Ans: .com domain signifies the website is used for commercial purposes while
.org domain signifies the website belongs to an organization.
(e) List 2 measures to secure a network. 2 Marks
Ans: To secure your network, you can:
1. activate firewall services and monitor them regularly
2. use virtual private network
(f) Distinguish between MAC address and IP address with the help of
example of each. 2 Marks
Ans: The difference between MAC address and IP address is as follows:

MAC Address IP Address

It denotes the physical address of the It denotes the logical address of the
computer. computer.

It can’t be changed if you change the It can be changed when you change
network. the network.

Example: 52:B8:01:FE:4E:D3 Example: 192.132.0.001

Class XII Informatics Practices www.vedantu.com 2


(g) Distinguish between Phonetic text entry and keymap based entry of
typing Indian language text. 2 Marks
Ans: The difference between Phonetic text entry and Keymap based entry is as
follows:

Phonetic Text Entry Keymap Based Entry

In this text entry, the text is written In this text entry, keywords are written
with a traditional keyboard but while using keymap i.e. the keyboard keys
writing Indian alphabets are written are mapped to specific characters in the
phonetically in English language. language.

2.(a) Write the value of t after the execution of the following code: 1 Mark
int t;
int s;
s=6;
t = (8 * s++) % 7;
Ans: t = 6
(b) Which tag is used to display a horizontal rule on a web page? 1 Mark
Ans: <hr>
(c) In a SWITCH statement, what is the purpose of BREAK statements?
1 Mark
Ans: Break statement is used to prevent fall through situation in switch
statements.
(d) Identify the error in the following HTML code. Rewrite the correct code.
1 Mark
<UL TYPE = “a” START = 4>
Ans: <OL TYPE = “a” START = 4>

Class XII Informatics Practices www.vedantu.com 3


(e) Write Java code to assign the value 70 to variable y. Then decrease the
value of y by 5 and store it in variable z. 2 Marks
Ans: int y = 70;
int z = y-5;
(f) Write the output that will be generated by the code given below: 2 Marks
int i;
int t;
for (i = 5; i <=10; i = i+5)
{
t = i+3;
system.out.println(“ ”+t);
}
Ans: The output is as follows:
8
13
(g) “With XML you invent your own tags.” Explain this statement with the
help of example. 2 Marks
Ans: A user can create his/her own XML tag if there is not built-in tag for use.
For example: <institution>Vedantu</institution>

3.(a) Sharmila wants to make the database named ‘COMPANY’ active and
display the names of all the tables in it. Write MySQL commands for it.
1 Mark
Ans: USE COMPANY;
SHOW TABLES;

Class XII Informatics Practices www.vedantu.com 4


(b) Write SQL command to remove column named ‘Hobbies’ from a table
named ‘Student’. 1 Mark
Ans: ALTER TABLE Student DROP COLUMN Hobbies;
(c) Rewrite the following SQL statement after correcting error(s). Underline
the corrections made. 1 Mark
INSERT IN EMP(EMPNO, SALES) VALUE (100, 20078.50);
Ans: INSERT INTO EMP(EMPNO, SALES) VALUES (100, 20078.50);
(d) A table STUDENT has 5 rows and 3 columns. Table ACTIVITY has 4
rows and 2 columns. What will be the cardinality and degree of the Cartesian
product of them? 1 Mark
Ans: Cardinality = 20 and degree = 5
(e) Name the SQL commands used to: 2 Marks
(i) Physically delete a table from the database.
(ii) Display the structure of a table.
Ans: (i) drop
(ii) desc
(f) Write one similarity and one difference between UNIQUE and
PRIMARY KEY constraints. 2 Marks
Ans: Unique and Primary Key constraints both ensure that the value of column
or the set of columns in each record is unique. Primary Key makes sure that no
record has null value in that column or the set of columns while Unique accepts
null values.
(g) What effect does SET AUTOCOMMIT have in transactions? 2 Marks
Ans: If AUTOCOMMIT is set to true then each transaction is committed
automatically and can't roll back the changes but if the AUTOCOMMIT is set
false then each transaction is not committed until the user commits them
manually.

Class XII Informatics Practices www.vedantu.com 5


4.(a) The following code has some error(s). Rewrite the correct code
underlining all the corrections made. 2 Marks
int written, interview;
written = Integer.parseInt(jTextField1.getText());
interview = Integer.parseInt(jTextField2.getText());
if (written <80) OR (interview <15)
{
System.out.println(Not selected);
}
Else;
{
System.out.println(“Selected”);
}
Ans: int written, interview;
written = Integer.parseInt(jTextField1.getText());
interview = Integer.parseInt(jTextField2.getText());
if (written <80 || interview <15)
{
System.out.println(“Not selected”);
}
else
{
System.out.println(“Selected”);
}
(b) How many times will the following loop execute: 2 Marks

Class XII Informatics Practices www.vedantu.com 6


int z = 7, sum = 0;
do
{
sum = sum + z;
z = z+2;
system.out.println(“ ”+z);
}
while (z <=12);
Ans: Loop will be executed 3 times.
(c) Rewrite the following program code using IF ELSE IF instead of
SWITCH statement. 2 Marks
String rem;
int code = Integer.parseInt(jTextField1.getText());
Switch (code)
{
case 1 : rem = “Classes start on 8th April”;
break;
case 2 : rem = “Classes start on 10th April”;
break;
case 3 : rem = “Classes start on 12th April”;
break;
default : rem = “Contact Admin Office”;
}
Ans: String rem;
int code = Integer.parseInt(jTextField1.getText());

Class XII Informatics Practices www.vedantu.com 7


if(code == 1)
rem = “Classes start on 8th April”;
else if(code == 2)
rem = “Classes start on 10th April”;
else if(code == 3)
rem = “Classes start on 12th April”;
else
rem = “Contact Admin Office”;
(d) Write the values of sum and t after execution of the following code:
2 Marks
int sum,t;
sum = 27;
t = 3;
sum = sum + 2 ∗ (++t);
Ans: sum = 35
t=4
(e) What will be the contents of jTextField1 and jTextField2 after executing
the following code: 2 Marks
String s = “Best”;
String r = “Luck”;
String z;
Z = r.concat(s);
jTextField1.setText(z);
jTextField2.setText(r.toUpperCase());
Ans: jTextField1 = LuckBest

Class XII Informatics Practices www.vedantu.com 8


jTextField2 = LUCK
(f) Seema is a junior programmer at ‘Avon Shoe Factory’. She has created
the following GUI in Netbeans.

● 3 items namely Shoes, Sandals and Slippers are manufactured by the


factory.
● A buyer can buy more than one item at a time.
● Each pair of shoes costs ₹1,500.00, each pair of sandals costs ₹1,000.00
and each pair of slippers cost ₹500.00.
● The item bought will be selected by the user and the Quantity (number of
pairs) bought will be entered by the user.
● Amount to be paid for that item will be displayed in front of the item.
For example if ‘Shoe’ is selected and Quantity entered is 20, then Amount
should be displayed as 30000.
Help Seema write code for the following: 3 Marks
(a) When ‘Calculate’ button is clicked, the amount should be displayed in
front of each item (in the appropriate textfield) and Total amount (sum total
of all the amounts) should be displayed in the appropriate textfield. 1 Mark
Ans: //Calculate

Class XII Informatics Practices www.vedantu.com 9


float qty1=0, qty2=0, qty3=0, amount1=0, amount2=0, amount3=0, total;
if (jCheckBox1.is Selected( ))
qty1 = Float.parseFloat(jTextField1.getText());
if (jCheckBox2.is Selected( )
qty2 = Float.parseFloat(jTextField2.getText());
if (jCheckBox3.is Selected( )
qty3 = Float.parseFloat(jTextField3.getText());
amoun1 = qty1*1500;
amount2 = qty2*1000;
amount3 = qty3*500;
total = amount1+amount2+amount3
jTextField4.setText (“ ”+amount1);
jTextField5.setText (“ ”+amount2);
jTextField6.setText (“ ”+amount3);
jTextField7.setText (“ ”+total);
(b) When the Clear button is clicked, all the Textfields and Checkboxes
should be cleared. 1 Mark
Ans: //Clear
jTextField1.setText (“ ”);
jTextField2.setText (“ ”);
jTextField3.setText (“ ”);
jTextField4.setText (“ ”);
jTextField5.setText (“ ”);
jTextField6.setText (“ ”);
jTextField7.setText (“ ”);

Class XII Informatics Practices www.vedantu.com 10


jCheckBox1.setSelected(false);
jCheckBox2.setSelected(false);
jCheckBox3.setSelected(false);
(c) When Stop button is clicked, the application should close. 1 Mark
Ans: //Stop
System.exit(0);

5.(a) Write one similarity and one difference between CHAR and
VARCHAR data types. 2 Marks
Ans: Char and Varchar both can store 1 to 255 characters. Char can store only
fixed length strings while Varchar can store variable length strings.
(b) Consider the following table named “GARMENT”. Write command of
SQL for (i) to (iv) and output for (v) to (vii).
Table: GARMENT

GCODE GNAME SIZE COLOUR PRICE

111 TShirt XL Red 1400.00

112 Jeans L Blue 1600.00

113 Skirt M Black 1100.00

114 Ladies Jacket XL Blue 4000.00

115 Trousers L Brown 1500.00

116 Ladies Top L Pink 1200.00

Class XII Informatics Practices www.vedantu.com 11


(i) To display names of those garments that are available in ‘XL’ size. 1 Mark
Ans: SELECT GNAME FROM GARMENT WHERE SIZE = ‘XL’;
(ii) To display codes and names of those garments that have their names
starting with ‘Ladies’. 1 Mark
Ans: SELECT GCODE, GNAME FROM GARMENT WHERE GNAME LIKE
‘Ladies%’;
(iii) To display garment names, codes and prices of those garments that have
price in the range 1000.00 to 1500.00 (both 1000.00 and 1500.00 included).
1 Mark
Ans: SELECT GNAME, GCODE, PRICE FROM GARMENT WHERE PRICE
BETWEEN 1000 AND 1500;
(iv) To change the colour of garment with code as 116 to “Orange”. 1 Mark
Ans: UPDATE TABLE GARMENT SET COLOUR = “Orange” WHERE
GCODE = 116;
(v) SELECT COUNT(DISTINCT (SIZE)) FROM GARMENT; 1 Mark
Ans: COUNT(DISTINCT (SIZE))
3
(vi) SELECT AVG (PRICE) FROM GARMENT; 1 Mark
Ans: AVG(PRICE)
1800
(vii) SELECT GNAME FROM GARMENT WHERE SIZE IN (‘M’, ‘L’)
AND PRICE > 1500; 1 Mark
Ans: GNAME
Jeans
(c) What is the degree and cardinality of ‘Garment’ table? 1 Mark
Ans: Cardinality = 6 and degree = 5

Class XII Informatics Practices www.vedantu.com 12


6.(a) Write MySql command to create the table DEPARTMENT with given
constraints. 2 Marks
Table: DEPARTMENT

COLUMN_NAME DATATYPE(SIZE) CONSTRAINT

DepartmentID int(4) Primary Key

DepName varchar(50) Not Null

ManagerID char(4)

Location varchar(30)

Ans: CREATE TABLE DEPARTMENT(


DepartmentID int(4) Primary Key,
DepName varchar(50) Not Null,
ManagerID char(4),
Location varchar(30)
);
(b) In a Database, there are two tables given below:
Table: EMPLOYEE

EMPLOYEEID NAME SALES JOBID

E1 SAMIT SINHA 1100000 102

E2 VIJAY SINGH TOMAR 1300000 101

E3 AJAY RAJPAL 1400000 103

E4 MOHIT RAMNANI 1250000 102

E5 SHAILJA SINGH 1450000 103

Table: JOB

Class XII Informatics Practices www.vedantu.com 13


JOBID JOBTITLE SALARY

101 President 200000

102 Vice President 125000

103 Administration Assistant 80000

104 Accounting Manager 70000

105 Accountant 65000

106 Sales Manager 80000

Write SQL Queries for the following :


(i) To display employee ids, names of employees, job ids with corresponding
job titles. 2 Marks
Ans: SELECT EMPLOYEEID, NAME, E.JOBID, JOBTITLE FROM
EMPLOYEE E, JOB J WHERE E.JOBID = J.JOBID;
(ii) To display names of employees, sales and corresponding job titles who
have achieved sales more than 1300000. 2 Marks
Ans: SELECT E.NAME, E.SALES, J.JOBTITLE FROM EMPLOYEE E, JOB
J WHERE E.JOBID = J.JOBID AND E.SALES> 1300000;
(iii) To display names and corresponding job titles of those employee who
have ‘SINGH’ (anywhere) in their names. 2 Marks
Ans: SELECT NAME, JOBTITLE FROM EMPLOYEE E, JOB J WHERE
E.JOBID = J.JOBID AND NAME LIKE ‘%SINGH%’;
(iv) Identify foreign key in the table EMPLOYEE. 1 Mark
Ans: EMPLOYEEID
(v) Write SQL command to change the JOBID to 104 of the Employee with
ID as E4 in the table ‘EMPLOYEE’. 1 Mark
Ans: UPDATE TABLE EMPLOYEE SET JOBID=104 WHERE
EMPLOYEEID=‘E4’;

Class XII Informatics Practices www.vedantu.com 14


7.(a) Write one advantage and one disadvantage of e-learning to students.
2 Marks
Ans: Advantage: Students can learn at their own pace convenient to them.
Disadvantage: Internet connectivity can be an issue for some students.
(b) What precaution must be taken with regard to making payments while
shopping online? 1 Mark
Ans: The user must make sure that they are making the payment at only known
and secured websites.
(c) James works for a Garments company. He has created a form for the
employees. Help him choose most appropriate controls from ListBox,
ComboBox, TextField, TextArea, RadioButton, Checkbox, Label and
Command Button for the following entries: 2 Marks

S.No Function

1 To enter first name of employee

2 To select gender (M/F)

3 To choose category of employee


(Permanent/Temporary)
4 To allow entering remarks about the employee in the form of
paragraph.

Ans: TextField for First Name of the employee, RadioButton for selecting
Gender and Category of the employee and TextArea for Remarks about the
employee.

Class XII Informatics Practices www.vedantu.com 15

You might also like