CBSE Sample Papers for Class 12 Informatics Practices Paper 2

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 are part of CBSE Sample Papers for Class 12 Informatics Practices. Here we have given CBSE Sample Papers for Class 12 Informatics Practices Paper 2.

CBSE Sample Papers for Class 12 Informatics Practices Paper 2

BoardCBSE
ClassXII
SubjectInformatics Practices
Sample Paper SetPaper 2
CategoryCBSE Sample Papers

Students who are going to appear for CBSE Class 12 Examinations are advised to practice the CBSE sample papers given here which is designed as per the latest Syllabus and marking scheme, as prescribed by the CBSE, is given here. Paper 2 of Solved CBSE Sample Paper for Class 12 Informatics Practices is given below with free PDF download solutions.

Time : 3 hrs

Maximum Marks : 70

General Instructions

  • All questions are compulsory.
  • Answer the’questions after carefully reading the text.

QUESTIONS

Question 1.

(a) The ‘Chalchitra’ theatre has a computer network. The network is in one building

(i) Name this type of network (out of LAN/MAN/WAN).

(ii) Name one communication channel that can be used for fast communication between workstations of the network.

(b) Explain in brief any 2 security threats to computer networks.

(c) Write the advantages of using Unicode to represent text.

(d) Write one example each of URL and IP address.

(e) Identify the topology shown below. Write 2 advantages of this topology.

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 1

Question 2.

(a) While working in Netbeans, Ms. Sonia has designed a login page where she wants to display “Welcome” or “Try again” message depending on the password entered by the user in text field named ‘jTextFieldl’. If password entered is “India”, ‘Welcome’ message should be displayed otherwise ‘Try again’ message should be displayed. Help her in choosing more appropriate statement out of ‘If statement’ and ‘Switch statement’. Give reason for your choice.

(b) Write Java code to assign the value 10 to variable x and store its square value in another variable y.

(c) Deepti works as a programmer in a travel company. She has developed the following code to display travel detail according to user’s choice. Help her in rewriting the same code using SWITCH CASE :

if (choice==1 )
jTextFieldl.setText ("New Delhi to Goa") ; 
else if (choice = 2)
jTextFieldl.setText ("New Delhi to Paris") ; 
else if (choice = 3)
jTextFieldl.setText ("New Delhi to Bangkok") ; 
else
jTextFieldl.setText ("PI. choose valid option") ;

(d) Shambhavi has to design two Web pages with following specifications :

(i) One Web page should have an unordered list.

(ii) Another Web page should have background ”Yellow” in colour.

Suggest her suitable tag(s) and attribute(s) for the above specifications.

(e) Albert works as a Website developer in Global Website Designers company. Currently he has created following tags in XML :

<STUDENT>...</STUDENT> 
<Student> ... </Student>

Are these tags part of HTML code or XML code?

Are these same or different? .

(f) How many times will the loop execute?

int value1 = 7. value2=19 ;
do
{
JOptionPane . showMessageDialog (null, valuel + value2) ; 
valuel=valuel+2 ; 
value2=value2-2 ;
} while (valuel<=value2) ;

Question 3.

(a) Consider the table’empsalary’

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 2

To select tuples with some salary, Siddharth has written the following erroneous SQL statement :

SELECT ID. Salary FROM empsalary WHERE Salary = something ;

Write the correct SQL statement.

(b) Consider the table ‘Employee’.

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 3

Write the SQL command to obtain the following output :

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 4

(c) While creating the table Student last week, Ms. Sharma forgot to include the column GamePlayed. Now write a command to insert the GamePlayed column with VARCHAR data type and 30 size into the Student table.

(d) In Marks column of ‘Student’ table, for Rollnumber 2, the Class Teacher entered the marks as 45. However there was a totaling error and the student has got her marks increased by 5. Which MySQL command should she use to change the marks in ‘Student’ table.

(e) Consider the table ‘Teacher’ given below.

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 5

What will be the output of the following queries on the basis of the above table :

(i) Select count(Department) from Teacher ;
(ii) Select count (*) from Teacher ;

(f) Consider the Stu table ,

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 6

The following SQL queries are executed on the above table

INSERT INTO Stu VALUES (5. ‘Gagan’ ) ;
COMMIT ;
UPDATE Stu SET NAME=‘Abhi’ WHERE ROLLNO = 4 
SAVEPOINT A ;
INSERT INTO Stu VALUES (6 , ‘Chris') ;
SAVEPOINT B ;
INSERT INTO Stu VALUES (7 , ‘Babita’) ;
SAVEPOINT C ;
ROLLBACK TO B ;

What will be the output of the following SQL query now :

SELECT * FROM Stu ;

(g) An attribute A of datatype varchar (20) has the value ‘Amit” . The attribute B of datatype char(20) has value “Karanita”. How many characters are occupied in attribute A? How many characters are occupied in attribute B?

Question 4.

(a) Following is a list of programming languages :

BASIC, COBOL, C, JAVA

Help Sandhya in identifying Object Oriented language(s) from the above given list.

(b) Satyam is designing a frame in Netbeans containing list box. Help him in writing suitable Java statement to extract selected item from a given listbox named “jList1.”

(c) What will be displayed in jTextFieldl and jTextField2 after the following code is executed :

int number = 12 ;
if (number < 15)
{
jTextField1.setText(" " + number) ;
number++ ; 
jTextField2.setText(“ “+ number) ;
} 
else
{
jTextFieldl . setText (“number 1”) ; 
number++ ;
jTextFleld2.setText (“number 2”) ;
}

(d) Find output of the following Java code snippet :

String City = "Delhi" ,PinCode="110001", Str=" " ;
City=City+" "+PinCode ;
JOptionPane.showMessageDialog(null,City) ; 
int l=City.length ( ) ; 
int i=0 ; 
while (i<l)
{
Str=Str+City.substring (6) ;
i = i +15 ;
}
JOptionPane.showMessageDialog (null.Str) ;

(e) Rewrite the following code using WHILE loop :

int x=100 ;
for (int i=2;i<=22;i=i+4)
{
jTextAreal.append("n"+(i+x) ) ; 
x=x-2 ;
}

(f) The following code has error(s). Rewrite the correct code underlining all the corrections made :

int n=5 , int i=l . f=l ;
do ;
{ 
f =f*i ; 
i + + ; 
while (i<=n) 
jTextFieldl.setText(" "+f) ;

(g) Mr. Pawan works as a programmer in “ABC Marketing Company” where he has designed a Salary generator software to generate the salary of salesman in which Name and Salary are entered by the user. A screenshot of the same is shown below :

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 7

Help him in writing the code to do the following :

(i) After selecting appropriate Radio Button, when ‘Commission’ button is clicked, commission should be displayed in the respective text field as each Salesman will get a commission based on the units sold according to the following criteria :

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 8

(ii) When ‘Gross Salary’ button is clicked, Gross Salary should be calculated and displayed in the respective text field as per the given formula :

Gross Salary = Salary + Commission

(iii) After required selection of Checkbox(es), when ‘Facility Charges’ button is clicked, Facility charges will be displayed in the respective text field according to the following criteria :

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 9

(iv) Money will be deducted from the Gross Salary according to the facilities opted by the employee. When ‘Net Salary’ button is clicked, Net Salary should be calculated and displayed in the respective text field as per the given formulae :

Net Salary = Gross Salary-Deductions

Question 5.

(a) Mrs. Sharma is the classteacher of Class ‘XII A’. She wants to create a table ‘Student’ to store details of her class.

(i) Which of the following can be the attributes of Student table?

(a) RollNo

(b) ‘Amit”

(c) Name

(d) 25

(ii) Name the Primary key of the table ‘Student’. State reason for choosing it.

(b) Write the output of the following SQL queries :

(i) SELECT TRUNCATE(8.975.2) ;
(ii) SELECT MID (‘HONESTY WINS' ,3,4) ;
(iii) SELECT RIGHTCCONCATC‘PRACTICES'INFORMATICS'), 5) ;
(iv) SELECT DAYOFMONTHA2015-01-16') ;

(c) Table “Emp” is shown below. Write commands in SQL for (i) to (iv) and output for (v) and (vi)

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 10

(i) To display list of all employees below 25 years old.

(ii) To list names and respective salaries in descending order of salary.

(iii) To count the number of employees with names starting with ‘K’.

(iv) To list names and addresses of those persons who have ‘Delhi’ in their address.

(v) SELECT Name. Salary FROM Emp WHERE Salary BETWEEN 50000 AND 70000 ;
(vi) SELECT Name, Phone FROM Emp WHERE Phone LIKE '99%' ;

Question 6.

(a) Write SQL query to create a table Player with the following structure :

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 11

(b) Consider the tables given below.

Salesperson

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 12


Orders

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 13

(i) The Salespersonld column in the “Salesperson” table is the ___ KEY. The Salespersonld column in the “Orders” table is a ___ KEY.

(ii) Can the ‘Salespersonld’ be set as the primary key in table ‘Orders’. Give reason.

(c) With reference to the above given tables (in Q6 b), Write commands in SQL for (i) and (ii) and output for (iii) below :

(i) To display Salespersonld, names, orderids and order amount of all salespersons.

(ii) To display names, salespersons ids and order ids of those sales persons whose names starts with A and sales amount is between 15000 and 20000.

(iii) SELECT Salespersonld, Name, Age, Amount FROM Salesperson, Orders WHERE Salesperson. Salespersonld = Orders. Salespersonld AND Age BETWEEN 30 AND 45 ;

Question 7.

(a) ‘Bachpan Toys’ is a small company manufacturing toys. They have decided that it would be beneficial to the company to create a Website which would allow customers to order toys on-line. State how ‘Bachpan Toys’ would benefit from the Website.

(b) Which of the following is/are the advantage(s) of e-Governance?

  1. Technology makes governance speedier.
  2. Computer literacy and basic Internet usage is not required.
  3. Governance is made transparent, that is most of the information is available to public.

(c) Lakshmi works for a school. She wishes to create controls on a form for the following functions. Choose appropriate controls from Text field, Label, Radio button, Check box, List box, Combo box, Button and write in the third column.

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 14

ANSWERS

Answer 1.

(a) (i) LAN (ii) Satellite

(b) Two security threats to computer networks are as follows :

  1. Computer worm It is a standalone malware computer program that replicates itself in order to spread to other computers.
  2. Spam It is flooding the Internet with many copies of the same message.

(c) Advantages of using Unicode to represent text are as follows :

  1. Allows for multilingual text using any or all the languages that you desire.
  2. Text in any language can be exchanged worldwide.

(d) Example of URL → http: // www. microsoft. com

Example of IP address → 192.168.0.0

(e) Star Topology

Two advantages of star topology are as follows :

  1. Easy to detect faults and remove It.
  2. Failure to single system will not bring down the entire network.

Answer 2.

(a) If statement is more appropriate for this situation because here is given only two conditions which will be executed by if statement while switch statement is used where multiple branch selection statements are given.

(b) class Square
{
public static void main (String args [ ])
{
int x. y ; 
x = 10 : 
y = x * x ;

(c) switch (choice)
{
Case 1 :
JTextFieldl. setText ("New Delhi to Goa") ; 
break ;
Case 2 :
jTextFieldl.setText ("New Delhi to Paris") ; 
break ;
Case 3 :
jTextFieldl.setText ("New Delhi to Bangkok") ; 
break ; 
default:
jTextFieldl.setText ("P1. choose valid option") ;
}

(d) (i) Tags → <HTML>, <B0DY><UL>, <LI>
Attribute → type

(ii) Tags → <HTML>, <B0DY>
Attribute → bgcolor

(e) These tags are part of XML code.

These are different because XML is a case sensitive language.

(f) 4 times

Answer 3.

(a) The correct code is :

SELECT ID, Salary FROM empsalary 
WHERE Salary = 56000 ;
(b) SELECT DISTINCT (Location) FROM Employee ;
(c) ALTER TABLE Student ADD Game_Played VARCHAR (30) ;
(d) UPDATE Student SET Marks = 50 
WHERE Roll number = 2;

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 22

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 23

(g) Characters are occupied in attribute A = 4
Characters are occupied in attribute B = 8

Answer 4.

(a) JAVA, COBOL

(b) jListl. getSelectedValue ( ) ;

(c) Output

jTextFieldl will contain value = 12

jTextField2 will contain value = 13

(d) Output

Delhi 110001

10001

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 16

(g) (i) We need to double click at the Commission button (jButtonl) and type the following code :

int Commission :
if (jRadioButtonl. isSelected ( ) = True )
Commission = 500 ;
else if (jRadioButton2. isSelected ( ) = True)
Commission = 1000 ; 
else
Commission = 2000 ;
jTextField3. setText (Commission) ;

(ii) We need to double click at the ‘Gross Salary’ button (jButton2) and type the following code:

int Gross_Sal ;
int Salary = Integer, parselnt (jTextField2. getText ( ) ) ; 
Gross_Sal = Salary + Commission ; 
jTextField4.setText (Gross_Sal) ;

(iii) We need to double click at the ‘Facilities Charges’ button (jButton3) and type the following code :

int Fac_Charges ;
if (jCheckBox1. is Selected ( ) == True)
Fac_Charges = 500 ;
else if (jCheckBox2. isSelected ( ) =True) 
Fac_Charges = 2000 ;
else
Fac_Charges = 0 ;
jTextField5. setText (Fac_Charges) ;

(iv) We need to double click at the ‘Net Salary’ button (jButton4) and type the following code :

int Net_Sal ; 
Net_Sal = Gross_Sal-Fac_Charges ; 
jTextField6. setText (Net_Sal) ;

Answer 5.

(a) (i) RolINo, Name can be the attributes of Student table.

(ii) Primary key of the table Student is RolINo, because RolINo is a field in Student table which uniquely identifies each rows/records in a database table.

(b) (i) 8.97

(ii) NEST

(iii) ATICS

(iv) 16

(c) (i) SELECT * FROM Emp 
WHERE AGE < 25 ; 
(ii) SELECT NAME, SALARY FROM Emp 
ORDER BY SALARY DESC ; 
(iii) SELECT NAME, COUNT (NAME) FROM Emp 
WHERE NAME like 'K%' ; 
(iv) SELECT NAME, ADDRESS FROM Emp 
WHERE ADDRESS like '% Delhi% ;

(v)

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 17

(vi)

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 18

Answer 6.

(a) CREATE TABLE Player

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 19

(b) (i) Primary, Foreign

(ii) Salespersons cannot be set as the primary key in the table Orders because table Orders has already primary key and one table cannot have more than one primary key column.

(c) (i) SELECT Salespersons, Name, Orderld, Amount FROM Salesperson ; Orders

WHERE Salesperson.Salespersonld = Orders. Salespersons ;

(ii) Select Name, Salespersons, Orderld FROM Salesperson, Orders

WHERE Salesperson. Salespersons = Orders. Salespersons AND Name like ‘A%’ AND Amount BETWEEN 15000 AND 20000 ;

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 20

Answer 7.

(a) Benefits from the Website are as follows :

  1. Customers can buy toys anywhere and anytime because Internet is online 24 hours a day, 7 days a week.
  2. With a Website, customers can easily access information about the toys.
  3. Business Website is the potential for reaching a wider audience.

(b) Advantage of e-Governance

Governance is made transparent, that is most of the information is available to public.

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 21

We hope the CBSE Sample Papers for Class 12 Informatics Practices Paper 2 help you. If you have any query regarding CBSE Sample Papers for Class 12 Informatics Practices Paper 2, drop a comment below and we will get back to you at the earliest.

You might also like

Comments are closed.