SlideShare a Scribd company logo
1 / 16
CBSE Question Paper 2018
Class 12 Informatics Practices
Time allowed : 3 hours
Maximum Marks : 70
Instructions :
1. All questions are compulsory.
2. Answer the questions after carefully reading the text.
1. a. ABC Company wants to link its computers in Head office in New Delhi to its office
in Sydney. Name the type of Network that will be formed. Which communication
media should be used to form this Network? (2)
Ans. Type of network that will be formed : Wide Area Network(WAN) Transmission
media to be used : Satellite
b. Which of the following is/are not communication media ?(2)
a. Microwaves
b. Optical Fiber cable
c. Node
d. Radio waves
Identify which of the above mentioned communication media are Wired
media and which ones are Wireless media.
Ans. Not communication media : Node
Wired media : Optical Fiber cable
Wireless media : Microwaves , Radio waves
c. Write two examples each of software in the following categories:(2)
i. Open Source Operating System
ii. OpenSourceWebBrowser
Ans.
i. Linux, Android, FreeBSD, OpenBSD, NetBSD, DragonFly BSD, OpenSolaris, illumos,
AuroraUX, Darwin, OpenDarwin, MINIX, FreeRTOS, FreeDOS, Haiku, House
KolibriOS, MenuetOS, GNU, ReactOS, L4, Fiasco, Pistachio, Plan 9, AROS, Syllable,
2 /
16
Inferno,NuttX,eCos, RTEMS,HelenOS,E/OS,TempleOS, Linux, BOSS,Ubuntu,Kali
Linux
ii. Mozilla Firefox, Google Chrome, Opera, QupZilla, Midori, rekonq, Tor Browser,
NetSurf, Pale Moon, GNOME Web
d. Expand the following terms : (2)
i. GSM
ii. IP
Ans.
i. GSM - Global System for Mobile Communications/ Global System for Mobile/
Graphics Stimulator Media
ii. IP - Internet Protocol
e. Name the devices: (2)
i. This device constantly looks at all the data entering and exiting your
connection. It can block or reject data in response to an established
rule.
ii. This device connects multiple nodes to form a network. It redirects the
received information only to the intended node(s).
Ans.
i. Firewall
ii. Switch
2. a. Identify the invalid variable names. State the reason if invalid. (1)
i. Marks Unit
ii. Product_1
iii. Sales123
iv. 2Marks
Ans. Invalid variable names are :
i. Marks Unit
Reason : Variable Name should not contain space
ii. 2Marks
Reason : Variable Name should not start with digit
b. Write the data type of variables that should be used to store: (1)
i. Marks of students
ii. Grades of students(Grade can be „A‟ or „B‟ or „C‟)
Ans.
3 /
16
i. float/ double /int / byte / short / long
ii. char
c. Write examples of any two properties and any two methods of jButton
component (2)
Ans. Properties of JButton component :
Background, font, label, text, name, editable, enabled, horizontalalignment, border
Methods of JButton component :
setText(), getText(), setEnabled(), setVisible(), setEditable(), setVisible(), isSelected(),
setSelected()
d. WritethepurposeofHTML.Distinguishbetween<P>and<BR>tag.(2)
Ans. HTML is used to create web page(s).
<P> tag is used to introduce a paragraph while <BR> tag is used to introduce a line
break on a web page.
Note: <P> as paragraph tag and <BR> as line break tag to be accepted as difference
e. Distinguish between ComboBox and ListBox. When would you prefer using them
over Radiobutton and Checkbox? (2)
Ans. A ComboBox allows selection of one item from a set of items.
while ListBox provides a scrollable set of items from which one or more item(s) may
be selected.
When the number of items are more Combobox or ListBox would be preferred over
Radiobutton and Checkbox.
f. Rewrite the following codeusing switch statement: (2)
if ( code == „A‟)
allowance = 3500;
else if ( code == „B‟)
allowance=3200;
else
allowance = 2000 ;
Ans. switch(code)
{
case ‘A’ : allowance = 3500;
break ;
case ‘B’ : allowance = 3200;
4 /
16
break ;
default : allowance = 2000;
}
3. a. What is MySQL used for? Abhay wants to start learning MySQL. From where can
he obtain the MySQL software ? (1)
Ans.
i. MySQL is an open source RDBMS used for managing databases.
ii. For obtaining MySQL, Abhay has the following options :
download from the website mysql.org
download it from any website that offers MySQL.
get the software from any source
b. Inthetable“Student”, Priya wantedto increasetheMarks(Column Name:Marks)
of those students by 5 who have got Marks below 33. She has entered the
following statement: (1)
SELECT Marks+5 FROM Student WHERE Marks<33;
Identify errors (ifany) in the above statement. Rewrite the correct SQL
statement.
Ans. Error : UPDATE should be used instead of SELECT
Correct SQL statement:
UPDATE Student SET Marks= Marks+5
WHERE Marks<33;
c. i. Name the Data type that should be used to store AccountCodes like “A1001” of
Customers.
ii. Name two Data types that require data to be enclosed in quotes. (2)
Ans.
i. char/ varchar
ii. char/ varchar/ date
d. Given the table „Player‟ with the following columns : (2)
Table : Player
PCODE POINTS
1 50
2 NULL
5 /
16
Write the output of the following statements:
i. SELECT AVG(POINTS)
FROM Player;
ii. Select COUNT(POINTS) FROM Player;
Ans.
i.
ii.
e. „Class‟ table has columns RNO and NAME .
The following statements are executed:
SET AUTOCOMMIT = 0;
INSERT INTO CLASS VALUES (5,„Rajiv‟);
COMMIT;
UPDATE CLASS SET NAME = „Rajeev‟ WHERE ID = 5;
SAVEPOINT A;
INSERTINTO CLASS VALUES (6,„Chris‟);
SAVEPOINT B;
INSERT INTO CLASS VALUES (7,„Feroze‟);
SELECT * FROM CLASS;
ROLLBACK TO B;
SELECT * FROM CLASS;
What will be the output of both the above given SELECT statements ? (2)
Ans. (Case 1 : If RNO is treated as ID, the following solution should be accepted:)
Output of SELECT statement 1 :
Output of SELECT statement 2 :
RNO NAME
5 Rajeev
3 40
RNO NAME
5 Rajeev
6 Chris
7 Feroze
6 /
16
6 Chris
(Case 2 : If RNO is NOT treated as ID, the following should be accepted:)
Output of SELECT statement 1 :
Output of SELECT statement 2 :
RNO NAME
5 Rajeev
6 Chris
Case 1 and 2 : ( 2 mark for output of any one of the SELECT statement)
f. Name SQL Single Row functions (for each of the following) that (2)
i. returns a number.
ii. returns lowercase letters.
iii. returns names of days. For example: “Monday “, “Tuesday”.
iv. returns weekday number. For example : 1 for Sunday , 2 for Monday , 3 for
Tuesday.
Ans.
i. length()/ instr()/ round()/ truncate() or any other correct Single Row Functionthat
returns a number
ii. lower() / lcase()
iii. dayname()
iv. dayofweek()
4. a. Identify the error in the following code: (1)
switch(c)
{
case 9.0 : a= a+2;
break;
case8.0:a=a+3;
break;
RNO NAME
5 Rajeev
6 Chris
7 Feroze
7 /
16
}
Ans. Variable ‘c’ cannot be of float/real data type.
b. What will be displayed in JOptionPane when the following code is executed? (2)
int a=5, b = 2;
while (a < 20)
{
a = a + b;
b = a - b;
JOptionPane.showMessageDialog(null,a);
}
Ans. 7
12
19
31
OR
7 12 19 31
c. Write the code given below using „for‟ loop instead of „while‟ loop: (2)
int i=1;
while(i<=5)
{
if(i * i == 4)
jTextField1.setText(""+i);
i=i+1;
}
Ans. int i;
for(i = 1; i <= 5; i++)
{
if(i * i == 4)
jTextField1.setText(""+i);
}
d. Write the value that will be stored in variable a after execution of the following
code if: (2)
8 /
16
i. initial value of a is 8.
ii. initial value of a is 10.
int b = 9;
if (a > b)
a=a+5;
a=a+2;
Ans.
i. 10
ii. 17
e. What will be the values of i and z after the following code is executed: (2)
int i = 0;
int z = 10;
do
{
i=i+2;
z--;
}
while (i<10);
Ans. i= 10
z = 5
f. Ms. Priya works as a programmer in “Avon Education” where she has designed a
software to compute fee charges to be paid by the students. A screenshot of the
same is shown below:
9 /
16
Name of the student is entered by the user.
Any one Course out of Pharmacy, Architecture and Arts & Design is chosen
by the user.
If the student is eligible for Concession, the required checkbox is selected
by the user.
Based on the course selected, Fee Per Quarter is displayed in the
appropriate textfield according to the following criterion:
Course Fee Per Quarter
Pharmacy 2000.0
Architecture 2500.0
Arts & Design 2300.0
10 / 16
If the student is eligible for Concession, a concession of 7% of Fee
per quarter is calculated as the concession amount, otherwise
concession amount is 0.
Fee to be paid is the Fee per quarter with the concession amount (if
any) deducted from it.
Help Ms. Priya in writing the code to do the following:
i. When „Calculate Charges‟ button is clicked, „Fee per quarter‟, „Concession
Amount‟, „Fee to be Paid‟ should be calculated and displayed in the respective
text fields. (4)
Ans. // Calculation of Amount
i. double feeperqtr = 0.0,concess = 0.0,feetopay=0.0;
if (jRadioButton1.isSelected())
feeperqtr=2000;
else if(jRadioButton2.isSelected())
feeperqtr=2500;
else if(jRadioButton3.isSelected())
feeperqtr=2300;
if (jCheckBox1.isSelected())
concess= (0.07*feeperqtr);
feetopay=feeperqtr-concess;
jTextField2.setText("" + feeperqtr);
jTextField3.setText("" + concess);
jTextField4.setText("" + feetopay);
ii. When „ CLEAR ‟ button is clicked, all the textfields, radiobuttons and
checkbox should be cleared. (1)
Ans. jTextField1.setText("");
jTextField2.setText("");
jTextField3.setText("");
jTextField4.setText("");
jRadioButton1.setSelected(false);
jRadioButton2.setSelected(false);
jRadioButton3.setSelected(false);
jCheckBox1.setSelected(false);
11 / 16
iii. When „ Exit ‟ button is clicked, the application should close. (1)
Ans. System.exit(0);
5. Consider the following table „Furniture‟. Write SQL commands for the statements (i)
to (viii) and write output for SQL queries (ix) and (x).
Table : Furniture
FCODE NAME PRCIE MANUFDATE WCODE
10023 Coffee table 4000 19-DEC-2016 W03
10001 Dining table 20500 12-JAN-2017 W01
10012 Sofa 35000 06-JUN-2016 W02
10024 Chair 2500 07-APR-2017 W03
10090 Cabinet 18000 31-MAR-2015 W02
i. To displayFCODE , NAME and PRICE ofitems that havePRICE lessthan ₹5,000.
(1)
Ans. SELECT FCODE, NAME,PRICE FROM Furniture
WHERE PRICE <5000;
ii. To display NAMES and PRICE of those Furniture Items that have „table‟ anywhere
in their names. (1)
Ans. SELECT NAME,PRICE FROM Furniture
WHERE NAME LIKE ‘%table%’;
iii. To display WCODE of Furniture Items. There should be no duplicate values. (1)
Ans. SELECT DISTINCT(WCODE) FROM Furniture;
iv. TodisplaytheNAMES andPRICEincreasedby500.00ofall thefurnitureitems.
(Price should only be displayed as increased; there should be no increase in the
data in the table) (1)
Ans. SELECT NAME, PRICE+500 FROM Furniture;
v. To display FCODE and NAME of each Furniture Item in descending order of
FCODE. (1)
Ans. SELECT FCODE, NAME FROM Furniture
ORDER BY FCODE DESC;
vi. To display the details of all the Furniture Items which have Manufacturing date(
MANUFDATE ) between 01-JAN-2016 and 15-JUN-2017 (inclusive of both the dates).
12 / 16
(1)
Ans. SELECT * FROM FURNITURE WHERE MANUFDATE BETWEEN ’2016-01-01’ AND
’2017-06-15’;
OR
SELECT * FROM FURNITURE WHERE MANUFDATE >= ’2016-01-01’ AND MANUFDATE
<= ’2017-06-15’;
OR
SELECT * FROM FURNITURE WHERE MANUFDATE BETWEEN ’01-JAN-2016’ AND ’15-
JUN-2017’;
OR
SELECT * FROM FURNITURE WHERE MANUFDATE >= ’01-JAN-2016’AND MANUFDATE
<=’15-JUN-2017’;
vii. To display the average PRICE of all the Furniture Items, which are made of Wood
with WCODE as W02. (1)
Ans. SELECT AVG(PRICE) FROM Furniture
WHERE WCODE = ‘W02’;
viii. To display WCODE wise, WCODE and the highest price of Furniture Items. (1)
Ans. SELECT WCODE, MAX(PRICE) FROM Furniture
GROUP BY WCODE;
ix. SELECT SUM(PRICE) FROM Furniture WHERE WCODE=‟W03‟; (1)
Ans.
x. SELECT COUNT(DISTINCT PRICE) FROM Furniture;(1)
Ans.
6. a. Write SQL query to create a table „Inventory‟ with the following structure:(2)
Field Type Constraint
MaterialId Integer Primary Key
Material Varchar(50) NOT NULL
Category Char
13 / 16
DatePurchase Date
Ans. CREATE TABLE Inventory
(
MaterialId INTEGER PRIMARY KEY,
Material Varchar(50)NOT NULL,
Category Char,
DatePurchase Date
);
b. Consider the following tables PATIENT and TEST and answer the questions that
follow: (2)
Table: PATIENT
FCODE NAME PHONE MANUFDATE TESTED
6473 Amit Sharma 912356899 19-JUN-2017 T102
7143 Rose Mathew 886744536 12-NOV-2017 T101
8786 Tina Sharma Arora 889088765 06-DEC-2017 T102
6477 Vijay 714567445 07-DEC-2017 T502
7658 Venkat Fazal 865545343 31-DEC-2017 T101
Note : NAME holds the Names of patients.
DTADMIT holds Dates on which patient was admitted to hospital.
TESTID holds Ids of Medical tests done onpatients.
Table: TEST
TESTED TESTNAME COST
T101 Platelet Count 200.00
T102 Hemogram 190.00
T301 Malaria Detection 135.00
T502 Glucose Test 150.00
Name the Primary keys in both the tables and foreign key in „ PATIENT ‟ table.
State the reason for your choice.
Ans. Primary key (Table : PATIENT ) - PCODE as it is unique to each row of table
14 / 16
Primary key (Table : TEST ) – TESTID as it is unique to each row of table
Foreign key in table PATIENT : TESTID as it links the two tables and is Primary key in
table TEST .
c. With reference to the above given tables (in Q6 b), Write commands in SQL for (i)
to (iii)
i. To display Names of Patients, TESTID and Test names for those Patients who
were admitted between „01-DEC-2017‟ and „15-DEC-2017‟ (both dates
inclusive). (2)
Ans. SELECTNAME, PATIENT.TESTID, TESTNAME/*TEST.TESTID accepted*/
FROM PATIENT, TEST
WHERE PATIENT.TESTID = TEST.TESTID
AND DTADMIT BETWEEN ‘01-DEC-2017’ and ’15-DEC-2017’;
OR
SELECT NAME,PATIENT.TESTID, TESTNAME /*TEST.TESTID accepted*/
FROM PATIENT, TEST
WHERE PATIENT.TESTID = TEST.TESTID
AND DTADMIT >=‘01-DEC-2017’and DTADMIT <= ’15-DEC-2017’;
OR
SELECT NAME, P.TESTID, TESTNAME /*T.TESTID accepted*/
FROM PATIENT P, TEST T
WHERE P.TESTID = T.TESTID
AND DTADMIT BETWEEN ‘01-DEC-2017’ and ’15-DEC-2017’;
OR
SELECT NAME, P.TESTID, TESTNAME /*T.TESTID accepted*/
FROM PATIENT P, TEST T
WHERE P.TESTID = T.TESTID
AND DTADMIT >= ‘01-DEC-2017’ and DTADMIT <= ’15-DEC-2017’;
ii. To display Names of Patients, Test names and Cost of Test for those Patients
who have “Sharma” in their names. (2)
15 / 16
Ans. SELECT NAME,TESTNAME,COST
FROM PATIENT, TEST
WHERE PATIENT.TESTID = TEST.TESTID
AND Name LIKE ‘%Sharma%’;
OR
SELECT NAME,TESTNAME,COST
FROM PATIENT P, TEST T
WHERE P.TESTID = T.TESTID
AND Name LIKE ‘%Sharma%’;
OR
SELECT P.NAME,T.TESTNAME,T.COST
FROM PATIENT P, TEST T
WHERE P.TESTID = T.TESTID
AND Name LIKE ‘%Sharma%’;
iii. To increase the cost of those tests in the table “ TEST ” by ₹50.00 that have
cost below ₹200.00(2)
Ans. UPDATE TEST
SETCOST=COST+50.00
WHERE COST<200.00;
7. a. How does e-governance help in building trust between the Government and
citizens? (2)
Ans.
Transparency of Government processes, policies and decisions
Awareness about new policies and facilities being offered by the Government.
Enabling citizen engagement in the policy processes
Reduces the waiting time
Practices like influences and bribing are reduced
b. How can e-learning help students learn at their own pace? (1)
Ans.
Students can go through the learning material any number of times as per
16 / 16
his/her learning abilities
Students can study at their own convenient time anywhere/anytime.
c. Ms. Cathy is creating a form for Vidya University Sports Council application.
Help her to choose the most appropriate controls from ListBox, ComboBox,
TextField,TextArea, RadioButton,CheckBox, LabelandCommand Buttonfor the
following entries: (2)
Ans.
S.No. Function
1. To let the user enter NAME TextField
2. To let the user enter MOBLIE NUMBER TextField
3.
To let the user choose one PROFESSION out of the
categories: Teaching/ Non-Teaching/ Research
Scholar
RadioButton/Combobox
4.
To let the user select facilities out of Gym, Yoga,
Table Tennis, Badminton and Aerobics. More than
one facility may be chosen.
Checkbox/Listbox
S.No. Function
1. To let the user enter NAME
2. To let the user enter MOBLIE NUMBER
3.
To let the user choose one PROFESSION out of the categories: Teaching/Non-
Teaching/Research Scholar
4.
To let the user select facilities out of Gym, Yoga, Table Tennis, Badminton and
Aerobics. More than one facility may be chosen.

More Related Content

PDF
CBSE Sample Paper IP
poonamchopra7975
 
DOCX
Sample paper i.p
poonamchopra7975
 
PDF
Sample Question Paper IP Class xii
kvs
 
DOCX
Java level 1 Quizzes
Steven Luo
 
PPTX
Java Quiz
Dharmraj Sharma
 
PDF
Question Paper Code 065 informatic Practice New CBSE - 2021
FarhanAhmade
 
PDF
Informatics Practices (new) solution CBSE 2021, Compartment, improvement ex...
FarhanAhmade
 
PDF
E5
lksoo
 
CBSE Sample Paper IP
poonamchopra7975
 
Sample paper i.p
poonamchopra7975
 
Sample Question Paper IP Class xii
kvs
 
Java level 1 Quizzes
Steven Luo
 
Java Quiz
Dharmraj Sharma
 
Question Paper Code 065 informatic Practice New CBSE - 2021
FarhanAhmade
 
Informatics Practices (new) solution CBSE 2021, Compartment, improvement ex...
FarhanAhmade
 
E5
lksoo
 

What's hot (18)

PDF
Computer science sqp
B Bhuvanesh
 
PDF
Computer science ms
B Bhuvanesh
 
DOCX
Java Questioner for
Abhay Korat
 
PDF
Computer Science Sample Paper 2015
Poonam Chopra
 
PPT
Chapter 4 Powerpoint
Gus Sandoval
 
PDF
Oops Quiz
Dr. C.V. Suresh Babu
 
PDF
Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12
chinthala Vijaya Kumar
 
DOCX
Cpcs 203 -array-problems
MaherAalQasim
 
PDF
GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...
chinthala Vijaya Kumar
 
PDF
FINAL PAPER FP301 OBJECT ORIENTED PROGRAMMING
Amira Dolce Farhana
 
PDF
Sample Paper 2 Class XI (Computer Science)
Poonam Chopra
 
PDF
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21
chinthala Vijaya Kumar
 
DOCX
Quiz test JDBC
vacbalolenvadi90
 
PDF
Ijarcet vol-2-issue-7-2323-2327
Editor IJARCET
 
PDF
important C questions and_answers praveensomesh
praveensomesh
 
PPT
Java basic tutorial by sanjeevini india
Sanjeev Tripathi
 
PPT
error detection correction
BishalWosti1
 
PDF
Mmt 001
sujatam8
 
Computer science sqp
B Bhuvanesh
 
Computer science ms
B Bhuvanesh
 
Java Questioner for
Abhay Korat
 
Computer Science Sample Paper 2015
Poonam Chopra
 
Chapter 4 Powerpoint
Gus Sandoval
 
Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12
chinthala Vijaya Kumar
 
Cpcs 203 -array-problems
MaherAalQasim
 
GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...
chinthala Vijaya Kumar
 
FINAL PAPER FP301 OBJECT ORIENTED PROGRAMMING
Amira Dolce Farhana
 
Sample Paper 2 Class XI (Computer Science)
Poonam Chopra
 
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21
chinthala Vijaya Kumar
 
Quiz test JDBC
vacbalolenvadi90
 
Ijarcet vol-2-issue-7-2323-2327
Editor IJARCET
 
important C questions and_answers praveensomesh
praveensomesh
 
Java basic tutorial by sanjeevini india
Sanjeev Tripathi
 
error detection correction
BishalWosti1
 
Mmt 001
sujatam8
 
Ad

Similar to CBSE 12 ip 2018 sample paper (20)

DOCX
Sample paper
poonamchopra7975
 
PDF
IP Sample paper 2 Class XI
Poonam Chopra
 
PDF
90 Informatics Practices.pdf
vikas500500
 
PDF
Informatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paper
Harish Gyanani
 
DOC
BISH CS Modle Exit Exam.doc
AnimutGeremew3
 
PDF
11th information practices paper CBSE INDIA 2012 2013
Harish Gyanani
 
DOC
Java programming lab assignments
rajni kaushal
 
PDF
CS Sample Paper 1
kvs
 
DOCX
split up syllabus_ip,cs-xi,xii
Sooraj Mohan
 
PDF
Sample Paper Class XI (Informatics Practices)
Poonam Chopra
 
PDF
IT 405
Sonil mittal
 
DOCX
1 Midterm Preview Time allotted 50 minutes CS 11.docx
honey725342
 
RTF
CBSE Grade12, Computer Science, Sample Question Paper
Malathi Senthil
 
PDF
Computing_Year 10_Track 1_Student Paper.pdf
raheeema suleman
 
DOC
Fic (sendup dec17) cs lb
Fazaia inter college lahore
 
DOC
Fic (sendup dec17) cs lb
Fazaia inter college lahore
 
PDF
Week 5
EasyStudy3
 
PDF
Week 5
EasyStudy3
 
DOC
Sp 1418794917
lakshmi r
 
PDF
9th_Computer Full Exercise
Naeem Mughal
 
Sample paper
poonamchopra7975
 
IP Sample paper 2 Class XI
Poonam Chopra
 
90 Informatics Practices.pdf
vikas500500
 
Informatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paper
Harish Gyanani
 
BISH CS Modle Exit Exam.doc
AnimutGeremew3
 
11th information practices paper CBSE INDIA 2012 2013
Harish Gyanani
 
Java programming lab assignments
rajni kaushal
 
CS Sample Paper 1
kvs
 
split up syllabus_ip,cs-xi,xii
Sooraj Mohan
 
Sample Paper Class XI (Informatics Practices)
Poonam Chopra
 
IT 405
Sonil mittal
 
1 Midterm Preview Time allotted 50 minutes CS 11.docx
honey725342
 
CBSE Grade12, Computer Science, Sample Question Paper
Malathi Senthil
 
Computing_Year 10_Track 1_Student Paper.pdf
raheeema suleman
 
Fic (sendup dec17) cs lb
Fazaia inter college lahore
 
Fic (sendup dec17) cs lb
Fazaia inter college lahore
 
Week 5
EasyStudy3
 
Week 5
EasyStudy3
 
Sp 1418794917
lakshmi r
 
9th_Computer Full Exercise
Naeem Mughal
 
Ad

More from Knowledge Center Computer (20)

PDF
APS PGT Computer Science SylIabus
Knowledge Center Computer
 
PPTX
Specialization and generalization quizz
Knowledge Center Computer
 
PPTX
Data structure part 3
Knowledge Center Computer
 
PPTX
Data structure part 4
Knowledge Center Computer
 
PPTX
Data structure part 2
Knowledge Center Computer
 
PPTX
Data structure part 1
Knowledge Center Computer
 
PPTX
Computer architecture PART 2
Knowledge Center Computer
 
PPTX
Computer architecture PART 1
Knowledge Center Computer
 
PDF
Course design class 12 ip
Knowledge Center Computer
 
PPTX
Programming languages java, python, sql and compare between c and python
Knowledge Center Computer
 
PPTX
Sql and Sql commands
Knowledge Center Computer
 
PPTX
E commerce and types
Knowledge Center Computer
 
PPTX
Android Operating System(OS)
Knowledge Center Computer
 
PPTX
Networking Basic MCQ's TEST
Knowledge Center Computer
 
PPTX
Physics QUIZ
Knowledge Center Computer
 
PDF
Information assistant exam complete syllabus 2018
Knowledge Center Computer
 
PPTX
Computer fundamentals in hindi
Knowledge Center Computer
 
PPTX
हिन्‍दी में मल्‍टीपल चॉइस कंप्यूटर साइंस क्विज Part 4
Knowledge Center Computer
 
APS PGT Computer Science SylIabus
Knowledge Center Computer
 
Specialization and generalization quizz
Knowledge Center Computer
 
Data structure part 3
Knowledge Center Computer
 
Data structure part 4
Knowledge Center Computer
 
Data structure part 2
Knowledge Center Computer
 
Data structure part 1
Knowledge Center Computer
 
Computer architecture PART 2
Knowledge Center Computer
 
Computer architecture PART 1
Knowledge Center Computer
 
Course design class 12 ip
Knowledge Center Computer
 
Programming languages java, python, sql and compare between c and python
Knowledge Center Computer
 
Sql and Sql commands
Knowledge Center Computer
 
E commerce and types
Knowledge Center Computer
 
Android Operating System(OS)
Knowledge Center Computer
 
Networking Basic MCQ's TEST
Knowledge Center Computer
 
Information assistant exam complete syllabus 2018
Knowledge Center Computer
 
Computer fundamentals in hindi
Knowledge Center Computer
 
हिन्‍दी में मल्‍टीपल चॉइस कंप्यूटर साइंस क्विज Part 4
Knowledge Center Computer
 

Recently uploaded (20)

PDF
Electricity-Magnetic-and-Heating-Effects 4th Chapter/8th-science-curiosity.pd...
Sandeep Swamy
 
PPTX
Software Engineering BSC DS UNIT 1 .pptx
Dr. Pallawi Bulakh
 
PPTX
How to Manage Leads in Odoo 18 CRM - Odoo Slides
Celine George
 
PPT
Python Programming Unit II Control Statements.ppt
CUO VEERANAN VEERANAN
 
PDF
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
PDF
High Ground Student Revision Booklet Preview
jpinnuck
 
PPTX
PPTs-The Rise of Empiresghhhhhhhh (1).pptx
academysrusti114
 
PDF
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
PPTX
IMMUNIZATION PROGRAMME pptx
AneetaSharma15
 
DOCX
SAROCES Action-Plan FOR ARAL PROGRAM IN DEPED
Levenmartlacuna1
 
PPTX
Odoo 18 Sales_ Managing Quotation Validity
Celine George
 
PDF
PG-BPSDMP 2 TAHUN 2025PG-BPSDMP 2 TAHUN 2025.pdf
AshifaRamadhani
 
PPTX
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
PPTX
Understanding operators in c language.pptx
auteharshil95
 
PPTX
Open Quiz Monsoon Mind Game Final Set.pptx
Sourav Kr Podder
 
PDF
1.Natural-Resources-and-Their-Use.ppt pdf /8th class social science Exploring...
Sandeep Swamy
 
PPTX
Skill Development Program For Physiotherapy Students by SRY.pptx
Prof.Dr.Y.SHANTHOSHRAJA MPT Orthopedic., MSc Microbiology
 
PPTX
Open Quiz Monsoon Mind Game Prelims.pptx
Sourav Kr Podder
 
PPTX
Presentation on Janskhiya sthirata kosh.
Ms Usha Vadhel
 
PDF
Phylum Arthropoda: Characteristics and Classification, Entomology Lecture
Miraj Khan
 
Electricity-Magnetic-and-Heating-Effects 4th Chapter/8th-science-curiosity.pd...
Sandeep Swamy
 
Software Engineering BSC DS UNIT 1 .pptx
Dr. Pallawi Bulakh
 
How to Manage Leads in Odoo 18 CRM - Odoo Slides
Celine George
 
Python Programming Unit II Control Statements.ppt
CUO VEERANAN VEERANAN
 
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
High Ground Student Revision Booklet Preview
jpinnuck
 
PPTs-The Rise of Empiresghhhhhhhh (1).pptx
academysrusti114
 
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
IMMUNIZATION PROGRAMME pptx
AneetaSharma15
 
SAROCES Action-Plan FOR ARAL PROGRAM IN DEPED
Levenmartlacuna1
 
Odoo 18 Sales_ Managing Quotation Validity
Celine George
 
PG-BPSDMP 2 TAHUN 2025PG-BPSDMP 2 TAHUN 2025.pdf
AshifaRamadhani
 
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
Understanding operators in c language.pptx
auteharshil95
 
Open Quiz Monsoon Mind Game Final Set.pptx
Sourav Kr Podder
 
1.Natural-Resources-and-Their-Use.ppt pdf /8th class social science Exploring...
Sandeep Swamy
 
Skill Development Program For Physiotherapy Students by SRY.pptx
Prof.Dr.Y.SHANTHOSHRAJA MPT Orthopedic., MSc Microbiology
 
Open Quiz Monsoon Mind Game Prelims.pptx
Sourav Kr Podder
 
Presentation on Janskhiya sthirata kosh.
Ms Usha Vadhel
 
Phylum Arthropoda: Characteristics and Classification, Entomology Lecture
Miraj Khan
 

CBSE 12 ip 2018 sample paper

  • 1. 1 / 16 CBSE Question Paper 2018 Class 12 Informatics Practices Time allowed : 3 hours Maximum Marks : 70 Instructions : 1. All questions are compulsory. 2. Answer the questions after carefully reading the text. 1. a. ABC Company wants to link its computers in Head office in New Delhi to its office in Sydney. Name the type of Network that will be formed. Which communication media should be used to form this Network? (2) Ans. Type of network that will be formed : Wide Area Network(WAN) Transmission media to be used : Satellite b. Which of the following is/are not communication media ?(2) a. Microwaves b. Optical Fiber cable c. Node d. Radio waves Identify which of the above mentioned communication media are Wired media and which ones are Wireless media. Ans. Not communication media : Node Wired media : Optical Fiber cable Wireless media : Microwaves , Radio waves c. Write two examples each of software in the following categories:(2) i. Open Source Operating System ii. OpenSourceWebBrowser Ans. i. Linux, Android, FreeBSD, OpenBSD, NetBSD, DragonFly BSD, OpenSolaris, illumos, AuroraUX, Darwin, OpenDarwin, MINIX, FreeRTOS, FreeDOS, Haiku, House KolibriOS, MenuetOS, GNU, ReactOS, L4, Fiasco, Pistachio, Plan 9, AROS, Syllable,
  • 2. 2 / 16 Inferno,NuttX,eCos, RTEMS,HelenOS,E/OS,TempleOS, Linux, BOSS,Ubuntu,Kali Linux ii. Mozilla Firefox, Google Chrome, Opera, QupZilla, Midori, rekonq, Tor Browser, NetSurf, Pale Moon, GNOME Web d. Expand the following terms : (2) i. GSM ii. IP Ans. i. GSM - Global System for Mobile Communications/ Global System for Mobile/ Graphics Stimulator Media ii. IP - Internet Protocol e. Name the devices: (2) i. This device constantly looks at all the data entering and exiting your connection. It can block or reject data in response to an established rule. ii. This device connects multiple nodes to form a network. It redirects the received information only to the intended node(s). Ans. i. Firewall ii. Switch 2. a. Identify the invalid variable names. State the reason if invalid. (1) i. Marks Unit ii. Product_1 iii. Sales123 iv. 2Marks Ans. Invalid variable names are : i. Marks Unit Reason : Variable Name should not contain space ii. 2Marks Reason : Variable Name should not start with digit b. Write the data type of variables that should be used to store: (1) i. Marks of students ii. Grades of students(Grade can be „A‟ or „B‟ or „C‟) Ans.
  • 3. 3 / 16 i. float/ double /int / byte / short / long ii. char c. Write examples of any two properties and any two methods of jButton component (2) Ans. Properties of JButton component : Background, font, label, text, name, editable, enabled, horizontalalignment, border Methods of JButton component : setText(), getText(), setEnabled(), setVisible(), setEditable(), setVisible(), isSelected(), setSelected() d. WritethepurposeofHTML.Distinguishbetween<P>and<BR>tag.(2) Ans. HTML is used to create web page(s). <P> tag is used to introduce a paragraph while <BR> tag is used to introduce a line break on a web page. Note: <P> as paragraph tag and <BR> as line break tag to be accepted as difference e. Distinguish between ComboBox and ListBox. When would you prefer using them over Radiobutton and Checkbox? (2) Ans. A ComboBox allows selection of one item from a set of items. while ListBox provides a scrollable set of items from which one or more item(s) may be selected. When the number of items are more Combobox or ListBox would be preferred over Radiobutton and Checkbox. f. Rewrite the following codeusing switch statement: (2) if ( code == „A‟) allowance = 3500; else if ( code == „B‟) allowance=3200; else allowance = 2000 ; Ans. switch(code) { case ‘A’ : allowance = 3500; break ; case ‘B’ : allowance = 3200;
  • 4. 4 / 16 break ; default : allowance = 2000; } 3. a. What is MySQL used for? Abhay wants to start learning MySQL. From where can he obtain the MySQL software ? (1) Ans. i. MySQL is an open source RDBMS used for managing databases. ii. For obtaining MySQL, Abhay has the following options : download from the website mysql.org download it from any website that offers MySQL. get the software from any source b. Inthetable“Student”, Priya wantedto increasetheMarks(Column Name:Marks) of those students by 5 who have got Marks below 33. She has entered the following statement: (1) SELECT Marks+5 FROM Student WHERE Marks<33; Identify errors (ifany) in the above statement. Rewrite the correct SQL statement. Ans. Error : UPDATE should be used instead of SELECT Correct SQL statement: UPDATE Student SET Marks= Marks+5 WHERE Marks<33; c. i. Name the Data type that should be used to store AccountCodes like “A1001” of Customers. ii. Name two Data types that require data to be enclosed in quotes. (2) Ans. i. char/ varchar ii. char/ varchar/ date d. Given the table „Player‟ with the following columns : (2) Table : Player PCODE POINTS 1 50 2 NULL
  • 5. 5 / 16 Write the output of the following statements: i. SELECT AVG(POINTS) FROM Player; ii. Select COUNT(POINTS) FROM Player; Ans. i. ii. e. „Class‟ table has columns RNO and NAME . The following statements are executed: SET AUTOCOMMIT = 0; INSERT INTO CLASS VALUES (5,„Rajiv‟); COMMIT; UPDATE CLASS SET NAME = „Rajeev‟ WHERE ID = 5; SAVEPOINT A; INSERTINTO CLASS VALUES (6,„Chris‟); SAVEPOINT B; INSERT INTO CLASS VALUES (7,„Feroze‟); SELECT * FROM CLASS; ROLLBACK TO B; SELECT * FROM CLASS; What will be the output of both the above given SELECT statements ? (2) Ans. (Case 1 : If RNO is treated as ID, the following solution should be accepted:) Output of SELECT statement 1 : Output of SELECT statement 2 : RNO NAME 5 Rajeev 3 40 RNO NAME 5 Rajeev 6 Chris 7 Feroze
  • 6. 6 / 16 6 Chris (Case 2 : If RNO is NOT treated as ID, the following should be accepted:) Output of SELECT statement 1 : Output of SELECT statement 2 : RNO NAME 5 Rajeev 6 Chris Case 1 and 2 : ( 2 mark for output of any one of the SELECT statement) f. Name SQL Single Row functions (for each of the following) that (2) i. returns a number. ii. returns lowercase letters. iii. returns names of days. For example: “Monday “, “Tuesday”. iv. returns weekday number. For example : 1 for Sunday , 2 for Monday , 3 for Tuesday. Ans. i. length()/ instr()/ round()/ truncate() or any other correct Single Row Functionthat returns a number ii. lower() / lcase() iii. dayname() iv. dayofweek() 4. a. Identify the error in the following code: (1) switch(c) { case 9.0 : a= a+2; break; case8.0:a=a+3; break; RNO NAME 5 Rajeev 6 Chris 7 Feroze
  • 7. 7 / 16 } Ans. Variable ‘c’ cannot be of float/real data type. b. What will be displayed in JOptionPane when the following code is executed? (2) int a=5, b = 2; while (a < 20) { a = a + b; b = a - b; JOptionPane.showMessageDialog(null,a); } Ans. 7 12 19 31 OR 7 12 19 31 c. Write the code given below using „for‟ loop instead of „while‟ loop: (2) int i=1; while(i<=5) { if(i * i == 4) jTextField1.setText(""+i); i=i+1; } Ans. int i; for(i = 1; i <= 5; i++) { if(i * i == 4) jTextField1.setText(""+i); } d. Write the value that will be stored in variable a after execution of the following code if: (2)
  • 8. 8 / 16 i. initial value of a is 8. ii. initial value of a is 10. int b = 9; if (a > b) a=a+5; a=a+2; Ans. i. 10 ii. 17 e. What will be the values of i and z after the following code is executed: (2) int i = 0; int z = 10; do { i=i+2; z--; } while (i<10); Ans. i= 10 z = 5 f. Ms. Priya works as a programmer in “Avon Education” where she has designed a software to compute fee charges to be paid by the students. A screenshot of the same is shown below:
  • 9. 9 / 16 Name of the student is entered by the user. Any one Course out of Pharmacy, Architecture and Arts & Design is chosen by the user. If the student is eligible for Concession, the required checkbox is selected by the user. Based on the course selected, Fee Per Quarter is displayed in the appropriate textfield according to the following criterion: Course Fee Per Quarter Pharmacy 2000.0 Architecture 2500.0 Arts & Design 2300.0
  • 10. 10 / 16 If the student is eligible for Concession, a concession of 7% of Fee per quarter is calculated as the concession amount, otherwise concession amount is 0. Fee to be paid is the Fee per quarter with the concession amount (if any) deducted from it. Help Ms. Priya in writing the code to do the following: i. When „Calculate Charges‟ button is clicked, „Fee per quarter‟, „Concession Amount‟, „Fee to be Paid‟ should be calculated and displayed in the respective text fields. (4) Ans. // Calculation of Amount i. double feeperqtr = 0.0,concess = 0.0,feetopay=0.0; if (jRadioButton1.isSelected()) feeperqtr=2000; else if(jRadioButton2.isSelected()) feeperqtr=2500; else if(jRadioButton3.isSelected()) feeperqtr=2300; if (jCheckBox1.isSelected()) concess= (0.07*feeperqtr); feetopay=feeperqtr-concess; jTextField2.setText("" + feeperqtr); jTextField3.setText("" + concess); jTextField4.setText("" + feetopay); ii. When „ CLEAR ‟ button is clicked, all the textfields, radiobuttons and checkbox should be cleared. (1) Ans. jTextField1.setText(""); jTextField2.setText(""); jTextField3.setText(""); jTextField4.setText(""); jRadioButton1.setSelected(false); jRadioButton2.setSelected(false); jRadioButton3.setSelected(false); jCheckBox1.setSelected(false);
  • 11. 11 / 16 iii. When „ Exit ‟ button is clicked, the application should close. (1) Ans. System.exit(0); 5. Consider the following table „Furniture‟. Write SQL commands for the statements (i) to (viii) and write output for SQL queries (ix) and (x). Table : Furniture FCODE NAME PRCIE MANUFDATE WCODE 10023 Coffee table 4000 19-DEC-2016 W03 10001 Dining table 20500 12-JAN-2017 W01 10012 Sofa 35000 06-JUN-2016 W02 10024 Chair 2500 07-APR-2017 W03 10090 Cabinet 18000 31-MAR-2015 W02 i. To displayFCODE , NAME and PRICE ofitems that havePRICE lessthan ₹5,000. (1) Ans. SELECT FCODE, NAME,PRICE FROM Furniture WHERE PRICE <5000; ii. To display NAMES and PRICE of those Furniture Items that have „table‟ anywhere in their names. (1) Ans. SELECT NAME,PRICE FROM Furniture WHERE NAME LIKE ‘%table%’; iii. To display WCODE of Furniture Items. There should be no duplicate values. (1) Ans. SELECT DISTINCT(WCODE) FROM Furniture; iv. TodisplaytheNAMES andPRICEincreasedby500.00ofall thefurnitureitems. (Price should only be displayed as increased; there should be no increase in the data in the table) (1) Ans. SELECT NAME, PRICE+500 FROM Furniture; v. To display FCODE and NAME of each Furniture Item in descending order of FCODE. (1) Ans. SELECT FCODE, NAME FROM Furniture ORDER BY FCODE DESC; vi. To display the details of all the Furniture Items which have Manufacturing date( MANUFDATE ) between 01-JAN-2016 and 15-JUN-2017 (inclusive of both the dates).
  • 12. 12 / 16 (1) Ans. SELECT * FROM FURNITURE WHERE MANUFDATE BETWEEN ’2016-01-01’ AND ’2017-06-15’; OR SELECT * FROM FURNITURE WHERE MANUFDATE >= ’2016-01-01’ AND MANUFDATE <= ’2017-06-15’; OR SELECT * FROM FURNITURE WHERE MANUFDATE BETWEEN ’01-JAN-2016’ AND ’15- JUN-2017’; OR SELECT * FROM FURNITURE WHERE MANUFDATE >= ’01-JAN-2016’AND MANUFDATE <=’15-JUN-2017’; vii. To display the average PRICE of all the Furniture Items, which are made of Wood with WCODE as W02. (1) Ans. SELECT AVG(PRICE) FROM Furniture WHERE WCODE = ‘W02’; viii. To display WCODE wise, WCODE and the highest price of Furniture Items. (1) Ans. SELECT WCODE, MAX(PRICE) FROM Furniture GROUP BY WCODE; ix. SELECT SUM(PRICE) FROM Furniture WHERE WCODE=‟W03‟; (1) Ans. x. SELECT COUNT(DISTINCT PRICE) FROM Furniture;(1) Ans. 6. a. Write SQL query to create a table „Inventory‟ with the following structure:(2) Field Type Constraint MaterialId Integer Primary Key Material Varchar(50) NOT NULL Category Char
  • 13. 13 / 16 DatePurchase Date Ans. CREATE TABLE Inventory ( MaterialId INTEGER PRIMARY KEY, Material Varchar(50)NOT NULL, Category Char, DatePurchase Date ); b. Consider the following tables PATIENT and TEST and answer the questions that follow: (2) Table: PATIENT FCODE NAME PHONE MANUFDATE TESTED 6473 Amit Sharma 912356899 19-JUN-2017 T102 7143 Rose Mathew 886744536 12-NOV-2017 T101 8786 Tina Sharma Arora 889088765 06-DEC-2017 T102 6477 Vijay 714567445 07-DEC-2017 T502 7658 Venkat Fazal 865545343 31-DEC-2017 T101 Note : NAME holds the Names of patients. DTADMIT holds Dates on which patient was admitted to hospital. TESTID holds Ids of Medical tests done onpatients. Table: TEST TESTED TESTNAME COST T101 Platelet Count 200.00 T102 Hemogram 190.00 T301 Malaria Detection 135.00 T502 Glucose Test 150.00 Name the Primary keys in both the tables and foreign key in „ PATIENT ‟ table. State the reason for your choice. Ans. Primary key (Table : PATIENT ) - PCODE as it is unique to each row of table
  • 14. 14 / 16 Primary key (Table : TEST ) – TESTID as it is unique to each row of table Foreign key in table PATIENT : TESTID as it links the two tables and is Primary key in table TEST . c. With reference to the above given tables (in Q6 b), Write commands in SQL for (i) to (iii) i. To display Names of Patients, TESTID and Test names for those Patients who were admitted between „01-DEC-2017‟ and „15-DEC-2017‟ (both dates inclusive). (2) Ans. SELECTNAME, PATIENT.TESTID, TESTNAME/*TEST.TESTID accepted*/ FROM PATIENT, TEST WHERE PATIENT.TESTID = TEST.TESTID AND DTADMIT BETWEEN ‘01-DEC-2017’ and ’15-DEC-2017’; OR SELECT NAME,PATIENT.TESTID, TESTNAME /*TEST.TESTID accepted*/ FROM PATIENT, TEST WHERE PATIENT.TESTID = TEST.TESTID AND DTADMIT >=‘01-DEC-2017’and DTADMIT <= ’15-DEC-2017’; OR SELECT NAME, P.TESTID, TESTNAME /*T.TESTID accepted*/ FROM PATIENT P, TEST T WHERE P.TESTID = T.TESTID AND DTADMIT BETWEEN ‘01-DEC-2017’ and ’15-DEC-2017’; OR SELECT NAME, P.TESTID, TESTNAME /*T.TESTID accepted*/ FROM PATIENT P, TEST T WHERE P.TESTID = T.TESTID AND DTADMIT >= ‘01-DEC-2017’ and DTADMIT <= ’15-DEC-2017’; ii. To display Names of Patients, Test names and Cost of Test for those Patients who have “Sharma” in their names. (2)
  • 15. 15 / 16 Ans. SELECT NAME,TESTNAME,COST FROM PATIENT, TEST WHERE PATIENT.TESTID = TEST.TESTID AND Name LIKE ‘%Sharma%’; OR SELECT NAME,TESTNAME,COST FROM PATIENT P, TEST T WHERE P.TESTID = T.TESTID AND Name LIKE ‘%Sharma%’; OR SELECT P.NAME,T.TESTNAME,T.COST FROM PATIENT P, TEST T WHERE P.TESTID = T.TESTID AND Name LIKE ‘%Sharma%’; iii. To increase the cost of those tests in the table “ TEST ” by ₹50.00 that have cost below ₹200.00(2) Ans. UPDATE TEST SETCOST=COST+50.00 WHERE COST<200.00; 7. a. How does e-governance help in building trust between the Government and citizens? (2) Ans. Transparency of Government processes, policies and decisions Awareness about new policies and facilities being offered by the Government. Enabling citizen engagement in the policy processes Reduces the waiting time Practices like influences and bribing are reduced b. How can e-learning help students learn at their own pace? (1) Ans. Students can go through the learning material any number of times as per
  • 16. 16 / 16 his/her learning abilities Students can study at their own convenient time anywhere/anytime. c. Ms. Cathy is creating a form for Vidya University Sports Council application. Help her to choose the most appropriate controls from ListBox, ComboBox, TextField,TextArea, RadioButton,CheckBox, LabelandCommand Buttonfor the following entries: (2) Ans. S.No. Function 1. To let the user enter NAME TextField 2. To let the user enter MOBLIE NUMBER TextField 3. To let the user choose one PROFESSION out of the categories: Teaching/ Non-Teaching/ Research Scholar RadioButton/Combobox 4. To let the user select facilities out of Gym, Yoga, Table Tennis, Badminton and Aerobics. More than one facility may be chosen. Checkbox/Listbox S.No. Function 1. To let the user enter NAME 2. To let the user enter MOBLIE NUMBER 3. To let the user choose one PROFESSION out of the categories: Teaching/Non- Teaching/Research Scholar 4. To let the user select facilities out of Gym, Yoga, Table Tennis, Badminton and Aerobics. More than one facility may be chosen.