11411solved Sample Paper 2012 XII IP
11411solved Sample Paper 2012 XII IP
11411solved Sample Paper 2012 XII IP
com
CLASS XII
SAMPLE PAPER-065
INFORMATICS PRACTICES
Time: 3 hrs. M.M. 70
--------------------------------------------------------------------------------------------------------
CBSE Sample Papers | CBSE Guess Papers | CBSE Practice Papers | Important Questions | CBSE PSA | CBSE OTBA |
Proficiency Test | 10 Years Question Bank | CBSE Guide | CBSE Syllabus | Indian Tutors | Teacher' Jobs CBSE eBooks |
Schools | Alumni | CBSE Results | CBSE Datesheet | CBSE News
CBSEGuess.com
they sound as per the pronunciation) in English Script and then converted to corresponding language
word. For e.g. we will type "mera desh mahaan" from English keyboard and the relevant phonetic key
entry software will transliterate it in the language selected eg. Hindi.("esjk ns'k egku")
Keymap based Entry: In this method the keyboard keys are mapped to specific characters using a
keymap. The whole arrangement of mapping the keyboard keys to specific language characters is
known as keymap.
Ans: 57
79
9
f) Write a method in Java that takes an year (4-digit) and return true if year is leap, otherwise false. [2]
Ans: boolean funLeap(int year)
{ if(year%4==0 && year%100!=0 || year%400==0)
return true;
--------------------------------------------------------------------------------------------------------
CBSE Sample Papers | CBSE Guess Papers | CBSE Practice Papers | Important Questions | CBSE PSA | CBSE OTBA |
Proficiency Test | 10 Years Question Bank | CBSE Guide | CBSE Syllabus | Indian Tutors | Teacher' Jobs CBSE eBooks |
Schools | Alumni | CBSE Results | CBSE Datesheet | CBSE News
CBSEGuess.com
else
return false;
}
g) What are the uses of the following tags:- [2]
<HTML>, <SUP>, <H1>, <TR>
Ans: <HTML> - Identifies that the document is a HTML document.
<SUP> - Displays the text in superscript way. i e. a2+b2
<H1> - Displays text in Heading format (for largest heading size)
<TR> - Used to specify table row, it is contained in <TABLE> tag.
Q 3. a) If a database “Library” exists. Write the command to start working in this database. [1]
Ans: USE Library;
b) While creating a table “MobDet”, Kavita forgot to set primary key for the table. Write the statement [1]
to set the column MobileNo as the primary key of the table.
Ans: ALTER TABLE MobDet ADD PRIMARY KEY (MobileNo);
c) Avani has created a table named “Doctor”, she wants to increase the OPDCharge by 25% of [1]
“Nephro” and “Cardio” department. She wrote a query-
UPDATE Nephro,Cardio SET OPDCharge=25% WHERE department IN (‘Nephro’,’Cardio’);
Help Avani to run the query by removing the errors from the query and write corrected query.
Ans: UPDATE Doctor SET OPDCharge= OPDCharge + OPDCharge *0.25 WHERE department
IN (‘Nephro’,’Cardio’);
d) Abhi wants to undo the changes made during the transaction execution. What command should [1]
Abhi use for this purpose?
Ans: ROLLBACK; (ROLLBACK works only when START TRANSACTION /BEGIN command
is issued)
e) Identify the candidate key(s) in the following table. [2]
Relation: Data
EmpNo
Name
Designation
MobileNo
PANCardNo
Salary
BankAccountNo
Ans: EmpNo, MobileNo, PANCardNo, BankAccountNo
f) GarCode, GarName, Price and FabrCode of table “GARMENT” are given below- [2]
GarCode GarName Price FabrCode
10015 Informal Pant 1899 F02
10089 Formal Pant 1295 F01
10075 Shirt 690 F01
10036 Frock 690 F04
Based on this information, find output of the following queries.
a) SELECT COUNT(Distinct FabrCode)) FROM GARMENT;
b) SELECT GarName FROM GARMENT WHERE FabrCode NOT LIKE ‘__1’;
Ans: a) 3
b) Informal Pant
Frock
--------------------------------------------------------------------------------------------------------
CBSE Sample Papers | CBSE Guess Papers | CBSE Practice Papers | Important Questions | CBSE PSA | CBSE OTBA |
Proficiency Test | 10 Years Question Bank | CBSE Guide | CBSE Syllabus | Indian Tutors | Teacher' Jobs CBSE eBooks |
Schools | Alumni | CBSE Results | CBSE Datesheet | CBSE News
CBSEGuess.com
g) What is the role of UNIQUE constraint? How is PRIMARY KEY constraint different from [2]
UNIQUE constraint?
Ans: UNIQUE constraint works same as Primary Key constraint but,
UNIQUE Attribute can be NULL but PRIMARY KEY can not be NULL.
UNIQUE can be assigned to many attribute but PRIMARY KEY can be assigned to one
attribute only in a table.
--------------------------------------------------------------------------------------------------------
CBSE Sample Papers | CBSE Guess Papers | CBSE Practice Papers | Important Questions | CBSE PSA | CBSE OTBA |
Proficiency Test | 10 Years Question Bank | CBSE Guide | CBSE Syllabus | Indian Tutors | Teacher' Jobs CBSE eBooks |
Schools | Alumni | CBSE Results | CBSE Datesheet | CBSE News
CBSEGuess.com
Ans: jTextField1 will contain 1219 and jTextField2 will contain New Year 2012
g) Dream Land Enterprises has computerized its billing. The following data entry screen is used to [6]
generate bill.
The criteria for calculation of delivery and handling charges is as given below-
Category of City Charges
A Class Rs. 3500
B Class Rs. 4000
C Class Rs. 4500
I. Write the code to make the text fileds txtSubTotal, txtTax, txtDelHanCh and txtTotal non
editable and set the category of city as C class.
II. Write code to do the following-
a) Write the code for Calculate button to calculate and display Sub Total, Tax, Delivery &
Handling Charges and Total depending on the category of the city.
o Sub Total is calculated as Unit Price * Quantity.
--------------------------------------------------------------------------------------------------------
CBSE Sample Papers | CBSE Guess Papers | CBSE Practice Papers | Important Questions | CBSE PSA | CBSE OTBA |
Proficiency Test | 10 Years Question Bank | CBSE Guide | CBSE Syllabus | Indian Tutors | Teacher' Jobs CBSE eBooks |
Schools | Alumni | CBSE Results | CBSE Datesheet | CBSE News
CBSEGuess.com
Ans: I. txtSubTotal.setEditable(False);
txtTax.setEditable(False);
txtDelHanCh.setEditable(False);
txtTotal.setEditable(False);
optCClass.setSelected(True);
II. a) Code for Calculate Button
double qty,unitPrice, tax, subtotal, dhCharges,total
qty=Double.parseDouble(txtQuantity.getText());
unitPrice=Double.parseDouble(txtUnitPrice.getText());
subtotal= qty* unitPrice;
if(chkCompEmpl.isSelected()==True)
tax=subtotal*(2.5/100);
else
tax= subtotal *(7.85/100);
if(optAClass.isSelected()==True)
dhCharges=3500;
if(optBClass.isSelected()==True)
dhCharges=4000;
if(optCClass.isSelected()==True)
dhCharges=4500;
total=subtotal+tax+dhCharges;
txtSubTotal.setText(“ “+subtotal);
txtTax.setText(“ “+tax);
txtDelHanCh.setText(“ “+dhCharges);
txtTotal.setText(“ “+total);
b) Code For Clear Button-
txtQuantity.setText(“ “);
txtQuantity.setText(“ “);
txtSubTotal.setText(“ “);
txtTax.setText(“ “);
txtDelHanCh.setText(“ “);
txtTotal.setText(“ “);
or
txtTotal.setText(null); //null can also be used.
Code for Exit Button-
System.exit(0);
Q 5. a) Explain the need of GROUP BY clause in SELECT query with example. [2]
Ans: GROUP BY clause is used to group all those records that have identical values in a
particular field or a group of fields (attribute). Eg.
SELECT stream, Count(*)
--------------------------------------------------------------------------------------------------------
CBSE Sample Papers | CBSE Guess Papers | CBSE Practice Papers | Important Questions | CBSE PSA | CBSE OTBA |
Proficiency Test | 10 Years Question Bank | CBSE Guide | CBSE Syllabus | Indian Tutors | Teacher' Jobs CBSE eBooks |
Schools | Alumni | CBSE Results | CBSE Datesheet | CBSE News
CBSEGuess.com
FROM student
GROUP BY stream;
It will display the stream wise no. of students.
Ans: i) 23
ii) 100
iii) 2
iv) NULL
c) Consider the table given below, write command in SQL for (1) to (4) and output for (5) to (8). [6]
Table : STUDENT
No Name Stipend Stream AvgMark Grade ClassSec
1 Karan 800 Medical 67.8 C 11D
2 Vishu 1500 Commerce 82.6 B 12B
3 Prabhat 2000 Humanities 85.7 B 12J
4 Selina 700 Medical 88.9 A 11C
5 Vinod 900 Science 65.9 C 11D
6 Karan 1200 Medical 68.6 D 12J
(1) To display the name and stream of all students who are in class 12.
(2) To display the different Streams available for students.
(3) To display name, avgmarks and grade in ascending order of grade.
(4) To display names of those students whose grade and section are same.
(5) SELECT Stipend+500 FROM Student WHERE stream LIKE ‘%ma%’;
(6) SELECT COUNT(*) FROM Student WHERE grade=’C’ OR stipend =800;
(7) SELECT ClassSec FROM Student WHERE Avgmark>68 && stream=’Medical’;
(8) SELECT AVG(stipend) FROM Student WHERE name=’Karan’;
--------------------------------------------------------------------------------------------------------
CBSE Sample Papers | CBSE Guess Papers | CBSE Practice Papers | Important Questions | CBSE PSA | CBSE OTBA |
Proficiency Test | 10 Years Question Bank | CBSE Guide | CBSE Syllabus | Indian Tutors | Teacher' Jobs CBSE eBooks |
Schools | Alumni | CBSE Results | CBSE Datesheet | CBSE News
CBSEGuess.com
WHERE RIGHT(classSec,1)=Grade;
(5) 2500
(6) 2
(7) 11C
12J
(8) 1000
b) In a database there are two tables ‘Doctors’ and ‘Patients’ shown below- [2]
Table: Doctors
DId DName OPDDays Timing
D521 R. K. Sinha Monday 10 am
D324 V. K.Singha Wednesday 9 am
D945 P. Kumar Friday 12 pm
D457 V. Prasad Saturday 10 am
D125 K. Krishna Tuesday 11 am
D220 M. Kumar Monday 12 pm
Table: Patients
PId Name Age Dept DateOfAdm Charges Gender DId
115 Jugal 36 Nephro 2005-12-15 260 M D324
621 Smita 45 Cardiology 2007-07-20 450 F D945
451 Reena 14 ENT Null Null F D457
136 Kishor 64 Surgery 2001-08-28 850 M D521
i) Name the column(s) that can be used to retrieve data from both the tables.
ii) Identify the Primary key and Foreign Key attributes from both the tables.
Ans: i) DId ( from Doctors and Patients table)
ii) PId – Primary Key ( Patient Table)
DId- Foreign Key (Patient Table)
DId- Primary Key ( Doctors Table)
c) Consider the tables given below- [6]
--------------------------------------------------------------------------------------------------------
CBSE Sample Papers | CBSE Guess Papers | CBSE Practice Papers | Important Questions | CBSE PSA | CBSE OTBA |
Proficiency Test | 10 Years Question Bank | CBSE Guide | CBSE Syllabus | Indian Tutors | Teacher' Jobs CBSE eBooks |
Schools | Alumni | CBSE Results | CBSE Datesheet | CBSE News
CBSEGuess.com
Table : Staff
StaffId Name Dept Gender Experience
1125 Noopur Sales F 12
1263 Kartik Finance M 6
1452 Palak Research F 3
236 Nayan Sales M 8
366 Anvashan Finance M 10
321 Sawan Sales M 7
Table : Salary
StaffId Basic Allowance CommPer
1125 14000 1500 9
1263 25000 2800 6
236 13500 1400 5
321 12000 1500 5
366 26100 3100 12
With reference to above tables, write commands in SQL for (i) and (ii) and output for (iii)-
(i) To display name of all the staff that are in Sales having more than 9 years experience and
commission percentage is more than 8.
(ii) To display average salary of staff working in Finance department. (Salary=Basic+allowance)
(iii) SELECT name, Basic from Staff, Salary WHERE Dept=’Sales’ and Staff.StaffId=Salary.StaffId;
Ans: i) SELECT Name
FROM Staff, Salary
WHERE Dept=’Sales’ AND Experience>9 AND CommPer>8 AND
Staff.StaffId=Salary.StaffId;
ii) SELECT AVG(Basic+Allowance) AS “Average Salary”
FROM Staff, Salary
WHERE Staff.StaffId=Salary.StaffId AND Dept=’Finance’;
iii) Noopur 14000
Nayan 13500
Sawan 12000
Q 7. a) What is e-Governance? Name any two major e-Governance projects in India. [2]
Ans: E-Governance refers to the application of electronic means in governance with an aim of
fulfilling the requirements of a common man at affordable costs and in fastest possible time.
Two projects are- Income Tax Portal, DRDO Project, Indian Courts, Supreme Court of India,
RTI Portal etc.
b) What is database connectivity? [1]
Ans: Database Connectivity refers to a programming interface through that front end access a
database on a backend via same means.
c) Mr. Anubhav is working as a programmer in a Hotel. He wants to create the forms to add the details [2]
of customers. Choose appropriate controls from Text Field, Label, Radio Button, Check Box, List Box,
Combo Box, and Command Button and write in the third column.
SNo Control Used to Control
--------------------------------------------------------------------------------------------------------
CBSE Sample Papers | CBSE Guess Papers | CBSE Practice Papers | Important Questions | CBSE PSA | CBSE OTBA |
Proficiency Test | 10 Years Question Bank | CBSE Guide | CBSE Syllabus | Indian Tutors | Teacher' Jobs CBSE eBooks |
Schools | Alumni | CBSE Results | CBSE Datesheet | CBSE News
CBSEGuess.com
Ans:
SNo Control Used to Control
1 Enter Name of Customer Text Field
2 Select Room Type Combo/ Radio Button
3 To display current date Label
4 Selection for extra facilities like Laundry, Food, Gym Check Box/ List Box
Marking Pattern:
Theory :
Networking & Open Source –10 Marks
Java - 20 Marks
HTML- 5 Marks
IT Application – 5 Marks
MySQL – 30 Marks
Total - 70 Marks
Practical:
Java – 10 Marks (A Program)
MySQL – 4 Marks (Queries on a table)
Records File – 6 Marks
Project Work – 4 Marks
Viva – 6 Marks
Total – 30 Marks
By:
Vinay Kumar Srivastava
PGT Computer Science
Email: [email protected]
--------------------------------------------------------------------------------------------------------
CBSE Sample Papers | CBSE Guess Papers | CBSE Practice Papers | Important Questions | CBSE PSA | CBSE OTBA |
Proficiency Test | 10 Years Question Bank | CBSE Guide | CBSE Syllabus | Indian Tutors | Teacher' Jobs CBSE eBooks |
Schools | Alumni | CBSE Results | CBSE Datesheet | CBSE News