mock pre-board examination marking scheme (2017-18) … · ans 216 64 8 ( 2 marks for correct...

12
1 MOCK PRE-BOARD EXAMINATION MARKING SCHEME (2017-18) CLASS XII INFORMATICS PRACTICES Time allowed :3hours Maximum marks : 70 A. Answer all parts of the same question together. B. Do your paper neatly. Q. No. Answer Marks 1 (a) Name any two proprietary software. 1 Ans MS Office, Oracle, Windows , Photoshop( any two) ( 1/2 mark for each correct software) (b) What was the objective behind developing UNICODE? 1 Ans UNICODE was developed with the objective to conceive a single standard code to represent most of the languages of the world. ( 1 mark for correct objective) (c) State two advantages of networking. 1 Ans Resource Sharing, Cost Saving, Collaborative Computing, Time Saving/Sharing, Enhanced security or any other advantage ( 1/2 mark for each correct advantage) (d) Give an example of a domain name and a URL? 1 Ans URL - http://www.helpingeachother.in/home/aboutus.htm Domain name helpingeachother ( 1/2 mark for each correct identification) (e) Explain Ogg Vorbis1 Ans It is a new audio compression which is open format developed by Xiph.org. It is roughly comparable to mp3, mpeg- formats and is completely free, open and unpatented. Hence it imposes no restrictions on its usage, types of usage, distributions, redistribution etc. ( 1 mark for correct definition) (f) What is the name of the network topology in which terminators are placed at its ends? Give any 2 advantages of this topology? 2

Upload: others

Post on 09-Mar-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MOCK PRE-BOARD EXAMINATION MARKING SCHEME (2017-18) … · Ans 216 64 8 ( 2 marks for correct output) 3 (a) Give the SQL command to view the structure of EMP table. 1 Descemp;Ans

1

MOCK PRE-BOARD EXAMINATION MARKING SCHEME (2017-18)

CLASS XII

INFORMATICS PRACTICES

Time allowed :3hours Maximum marks : 70

A. Answer all parts of the same question together.

B. Do your paper neatly.

Q.

No.

Answer Marks

1 (a) Name any two proprietary software. 1

Ans MS Office, Oracle, Windows , Photoshop( any two)

( 1/2 mark for each correct software)

(b) What was the objective behind developing UNICODE? 1

Ans UNICODE was developed with the objective to conceive a single standard code to

represent most of the languages of the world.

( 1 mark for correct objective)

(c) State two advantages of networking. 1

Ans Resource Sharing, Cost Saving, Collaborative Computing, Time Saving/Sharing,

Enhanced security or any other advantage

( 1/2 mark for each correct advantage)

(d) Give an example of a domain name and a URL?

1

Ans URL - http://www.helpingeachother.in/home/aboutus.htm

Domain name – helpingeachother

( 1/2 mark for each correct identification)

(e) Explain Ogg Vorbis.· 1

Ans It is a new audio compression which is open format developed by Xiph.org.

It is roughly comparable to mp3, mpeg- formats and is completely free, open and

unpatented. Hence it imposes no restrictions on its usage, types of usage,

distributions, redistribution etc.

( 1 mark for correct definition)

(f) What is the name of the network topology in which terminators are placed at its

ends? Give any 2 advantages of this topology?

2

Page 2: MOCK PRE-BOARD EXAMINATION MARKING SCHEME (2017-18) … · Ans 216 64 8 ( 2 marks for correct output) 3 (a) Give the SQL command to view the structure of EMP table. 1 Descemp;Ans

2

Ans Bus topology. Advantages are

Easy to connect a computer or peripheral to a linear bus i.e. easy to extend.

Requires less cable length than a star topology.

(1 mark for identification and 1/2 mark for each correct advantage)

(g) What is a Bridge? How is it different from a Gateway?

2

Ans Bridge – connects two LANS having the same protocol

Gateway : Gateway is a device that connects dissimilar networks. Establishes

intelligent connection between a local network and external networks with

completely different structures. Gateway is the ISP that connects the user to the

internet.

( 1 mark for each correct difference)

(h) Mention at least two points of differences between freeware and Shareware. 2

Ans FREEWARE SHAREWARE

Freeware refers to software that anyone

can download from the Internet and use

for free.

Sharewares give users a chance to try the

software before buying it.

All the features are free. Most of the times, all features are not

available, or have limited use. To use all

the features of the software, user has to

purchase the software.

Freeware programs can be distributed

free of cost.

Shareware may or may not be distributed

freely. In many cases, author‟s

permission is needed, to distribute the

shareware.

Adobe PDF, Google Talk, yahoo

messenger, MSN messenger,Microsoft

Internet Explorer and iTunes

Winzip, Cuteftp, Getright

( 1 mark for correct definition and 1 mark for correct explanation )

(i) Give two advantages and limitations of star topology? 2

Ans Central node dependency: In this topology central node is a controller of the network.

If the central node fails, the entire network will be failed.

ii) Difficult to expand: The addition of a new node to a network involves a connection all the way to the central node.

( 1 mark each for correct limitation)

(j) Write a note on Linux and Apache Server 2

Page 3: MOCK PRE-BOARD EXAMINATION MARKING SCHEME (2017-18) … · Ans 216 64 8 ( 2 marks for correct output) 3 (a) Give the SQL command to view the structure of EMP table. 1 Descemp;Ans

3

Ans LINUX– it is free and open source software.

It can be downloaded from www.linux.org

Linux is a part of popular web server program LAMP (Linux, apache, MySql, PHP).

Apache Server

The most common web server (or HTTP server) software on the Internet.

Apache is designed as a set of modules, enabling administrators to choose which

Features theywish to use and making it easy to add features to meet

specific needs including handlingprotocols other than the web-standard HTTP.

Apache HTTP server is an open source web server.It is component of LAMP.

( 1 mark for each correct definition)

2 (a) Name the property which is used for setting the password character as „$‟. 1

Ans Echochar

( 1 mark for correct property)

(b) Which tags are used for making a table and adding rows in a HTML document . 1

Ans <TABLE></TABLE> tags are used for making a table .

<TR></TR> are used for adding rows in a HTML document.

( ½ mark for each correct tag/attribute)

(c) Write Java code that takes the price of a pencil from jTextField1 and quantity of

pencils from jTextField2 and calculates total amount as price * quantity to be

displayed in jTextField3 .Also find 10% tax amount to be displayed in jTextField4.

2

Ans float Price = Float.parseFloat(jTextField1.getText());

intQty=Integer.parseInt(jTextField2.getText());

float Amt= Price* Qty;

float Tax= Amt*0.1;

jTextField3.setText(""+Amt);

jTextField4.setText(""+Tax);

( 2 mark for correct output)

(e) Give any 2 features of HTML. Explain with an example how we can create our own

tags in XML.

2

Ans HTML rules:

1. Tags are not case sensitive.

2. Attributes are also not case sensitive.

3. Attribute values are case sensitive.

For example :

Page 4: MOCK PRE-BOARD EXAMINATION MARKING SCHEME (2017-18) … · Ans 216 64 8 ( 2 marks for correct output) 3 (a) Give the SQL command to view the structure of EMP table. 1 Descemp;Ans

4

To store address , the tag <address> may be used as :

< address > Punjabi Bagh</ address >

( ½ mark for each correct feature and 1 mark for explanation through example)

(f) Write a function in Java that takes principal, rate and time of float data type as

parameters and returns Simple Interest. 2

Ans float SI(float p, float r, float t)

{

float ans = (p*r*t)/100;

return ans;

}

( 2 marks for correct output)

(g) Write the output that will be generated by the code given below:

for (inti=6; i>=1; i=i-2)

jTextArea1.append ( “ ”+ Integer.toString (i*i*i) );

2

Ans 216 64 8

( 2 marks for correct output)

3 (a) Give the SQL command to view the structure of EMP table. 1

Ans Descemp;

(1 mark for correct command)

(b) Is NULL same as 0(zero). Elaborate 1

Ans NULL means Unknown/No value/Empty while 0 is a numeric value.

( 1 mark for correct explanation)

(c) Explain SAVEPOINT. 1

The SAVEPOINT statement defines a marker in a transaction. These markers are useful in

rolling back a transaction till the marker.

SAVEPOINT Mark1;

Ans ( 1 mark for correct answer)

(d) A table FOOD has 5 rows and 10 columns and table CUSTOMER has 10 rows and

10 columns. What is the cardinality and degree of the Cartesian product of the

tables?

1

Ans Cardinality – 50 Degree – 20

( 1/2 mark for correct answer)

(e) A numeric column MONEY contains 8355.555. Give the SQL commands to

truncate MONEY.

2

Page 5: MOCK PRE-BOARD EXAMINATION MARKING SCHEME (2017-18) … · Ans 216 64 8 ( 2 marks for correct output) 3 (a) Give the SQL command to view the structure of EMP table. 1 Descemp;Ans

5

(i) Up to 2 decimal places. (i.e. expected result 8355.56)

(ii) Up to -3 places (i.e expected result 8000)

Ans (i) SELECT ROUND (MONEY,2);

(ii) SELECT ROUND(MONEY,-3);

( 1 mark for each correct command)

(f) What is the difference between CURDATE() and DATE() functions? 2

Ans CURDATE() Returns the current date in YYYY-MM-DD format or

YYYYMMDD format, depending on whether the function is used in a string or numeric

context.

DATE(expr) extracts the date part of a date or datetime expression.

( 1 mark each for correct definition)

(g) A programmer has created a 5 digit password and stored in a string variable

calledstrPassword. He wants to store the samepassword in an Integer type variable

calledintPassword. Write an appropriate Java statement to transfer the content from

strPasswordto intPassword.

2

Ans intPassword = Integer.parseInt(strPassword);

( 1 mark for each correct assignment)

4 (a) What is IDE?

1

Ans A programming environment, where all the tools required for programming are available Under one roof is called IDE.

( 1 mark for correct definition)

(b) Write a statement to make jTextArea1 as un- editable.

Ans jTextArea1.setEditable(false);

( 1 mark for correct answer)

(c) What will be displayed in jTextArea1 after executing the following statement :

jTextArea1.setText(“TAFS\n is\t the best”); 1

Ans TAFS

is the best

( 1 mark for correct answer)

(d) Define Object Oriented Programming and inheritance? 2

Ans OOP (Object Oriented Programming) CONCEPT

The basic idea of OOP language is to combine data and the functions that operate on

this data into a single unit. Such a unit is called object. An object represents an

entity that can store data and has its interface through functions. The data of an

object are data members and functions are called member functions in java.

Reusability of code (inheritance) through which we can derive new classes from an

older one in OOP.

Page 6: MOCK PRE-BOARD EXAMINATION MARKING SCHEME (2017-18) … · Ans 216 64 8 ( 2 marks for correct output) 3 (a) Give the SQL command to view the structure of EMP table. 1 Descemp;Ans

6

( 1 mark for each correct definition)

(e) The following code has some error(s). Rewrite the correct code underlining all the

corrections made.

Int P=3;sum = 0;

{

Sum = P;

P += 3;

} while (P=12)

jTextField1(Integer.tostring(sum));

2

Ans int P=3,sum=0;

do

{

sum = P;

P +=3;

}

while(P= =12);

jTextField1.setText(Integer.toString(sum));

( ½ mark each for correcting an error)

(f) What will be displayed in jTextField1 jTextField2 and jTextField3after the

execution of the following code?

jTextField1.setText(“ “+ Math.round(-34.56));

jTextField2.setText( Math.pow(5,2));

String st="Happy New Year 2018";

jTextField1.setText(""+st.substring(17)+st.length();

2

Ans -35

25

jTextField3 will contain 1819

(2 marks for correct output)

(g) Rewrite the following program code using if ..else statement:

String Remarks;

int Code=Integer.parseInt(jTextField1.getText());

switch (Code)

{

case 0:

case 1:

case 2:Remarks="30% Tax Exemption";

break;

2

Page 7: MOCK PRE-BOARD EXAMINATION MARKING SCHEME (2017-18) … · Ans 216 64 8 ( 2 marks for correct output) 3 (a) Give the SQL command to view the structure of EMP table. 1 Descemp;Ans

7

case 3 : Remarks="50% Tax Exemption";

break ;

default:Remarks="!Invalid Entry";

}

Ans int Code = Integer.parseInt(jTextField1.getText());

if ((Code == 0)||(Code == 1)||(Code == 2))

Remarks = "30% Tax Exemption";

else if(code ==3)

Remarks = "30% Tax Exemption";

else

Remarks = "! Invalid Entry";

( 2 marks for correct conversion)

(h) Pizza Cafe selling pizzas has computerized its billing. The following is the data

entry screen used at their outlet. The outlet offers regular pizza at the rate of Rs400

per pizza and pan pizza at the rate of Rs 450 per pizza. . The user has a choice of

three different types of extra toppings where Cheese extra topping costs Rs 60 and

capsicum costs Rs 40.

(i) Write the code to clear all textfields, select regular radio button.

private void cmdClearActionPerformed(java.awt.event.ActionEventevt) {

txtName.setText("");

txtQty.setText("");

txtRate.setText("");

txtTop.setText("");

txtAmount.setText("");

1

Page 8: MOCK PRE-BOARD EXAMINATION MARKING SCHEME (2017-18) … · Ans 216 64 8 ( 2 marks for correct output) 3 (a) Give the SQL command to view the structure of EMP table. 1 Descemp;Ans

8

optRegular.setSelected(true);

}

(ii) Write the code to display the rate of a pizza based on the pizza type

selected . private void cmdCalcRateActionPerformed(java.awt.event.ActionEventevt) {

if (optRegular.isSelected())

txtRate.setText(String.valueOf(400));

else

if (optPan.isSelected())

txtRate.setText(String.valueOf(450));

}

(iii)Write the code for AmountBTN to calculate the total amount and display it

in AmountTF. The total amount should include the cost of extra toppings

selected by the customer.

private void cmdCalcAmtActionPerformed(java.awt.event.ActionEventevt) {

int Top = 0; // Topping cost

float Amt = 0; // Pizza amount

// Finding topping cost

if (chkCheese.isSelected())

{

Top +=60;

}

if (chkCap.isSelected())

{

Top = Top + 40;

}

txtTop.setText(Integer.toString(Top));

// Finding Pizza order amount

Amt = (Integer.parseInt(txtRate.getText())+Top)*Integer.parseInt(txtQty.getText());

txtAmount.setText(Float.toString(Amt));

}

1

4

5 (a) Differentiate between SQL and My SQL. 1

Ans SQL stands for Structured Query Language. It‟s a standard language for

accessing and manipulating databases.

MySQL is a Relational Database Management System (RDBMS), like SQL

Server, Oracle, Informix, Postgres, etc. MySQL is a RDBMS.

( 1/2 mark for each correct example )

(b) What is the purpose of the following command – 1

Page 9: MOCK PRE-BOARD EXAMINATION MARKING SCHEME (2017-18) … · Ans 216 64 8 ( 2 marks for correct output) 3 (a) Give the SQL command to view the structure of EMP table. 1 Descemp;Ans

9

ALTER TABLE STUDENT ADD PRIMARY KEY ADMNO;

Ans To make admno as primary key in an existing table STUDENT.

(1 mark for correct answer)

(c) Write output of the following SQL queries :

(i) SELECT DAYOFMONTH(„2010-12-22);

(ii) SELECT TRUNCATE(190,-2);

(iii) SELECT INSTR(„Coordination „,‟o‟);

(iv) SELECT CONCAT(„India‟,NULL,‟Australia‟);

2

Ans (i) 22

(ii) 100

(iii) 2

(iv) NULL

( 1/2 mark for each correct output)

(d) Consider the following table FLIGHT given below. Write command of SQL for (i)

to (iv) and output for (v) to (vi

Table:FLIGHT

FLCODE START DESTINATION STOPS PRICE

IC101 MUMBAI DELHI 1 5000

IC102 SIKKIM MUMBAI 1 8000

IC103 SIKKIM DELHI 0 5000

IC105 CHENNAI KANPUR 2 8000

IC107 KANPUR MUMBAI 0 7000

IC431 CHENNAI INDORE 3 6000

IC121 KANPUR DELHI 2 6500 (i) Displaydetails ofallflights startingfrom MUMBAI and destination as Delhi .

(ii) Display t h e detailsofflighs whose destination starts and ends with

D and have no stoppage.

(iii) Combine and display the first 2 and last 2 letters of the flight

codes.

(iv) Display destinations along with flight codes of all

whosestarting places beginswith „J‟ and ends with „R‟

(v) SELECT count(DISTINCT(STOPS)) FROM FLIGHT;

(vi) SELECT START, COUNT(*) FROM FLIGHT GROUP BY START;

6

Ans Select * from flight where start =‟mumbai‟ and destination=‟delhi‟;

( 1 mark for correct command)

Page 10: MOCK PRE-BOARD EXAMINATION MARKING SCHEME (2017-18) … · Ans 216 64 8 ( 2 marks for correct output) 3 (a) Give the SQL command to view the structure of EMP table. 1 Descemp;Ans

10

Select concat(left(flcode,2),right(flcode,2)) from flight;

( 1 mark for correct command)

Select flcode ,start ,destination from flight order by no_flight;

( 1 mark for correct command)

Select flcode ,destination from flight where start like „j%r‟ ;

( 1 mark for correct command)

count (DISTINCT(STOPS))

4

(1 mark for correct output)

START COUNT(*)

MUMBAI 1

SIKKIM 2

CHENNAI 2

KANPUR 2

(1 mark for correct output)

6 (a) Write MySQL commands to create a table SALESPERSON‟under database

SOCIETY with the following specifications

Table:SALESPERSON

Field Type Size Constraint

SCODE Integer 6 PrimaryKey

FIRSTNAME Varchar 25 NotNull

LASTNAME Varchar 25 NotNull

CITY Varchar 30 Default delhi

SALES Decimal 8,2

2

Ans CREATE TABLE salesperson

( scode int(6) primary key,

firstname varchar(25) not null,

lastname varchar(25) not null,

city varchar(30) default „delhi‟,

sales decimal(8,2)

);

(1 mark for CREE TABLE)

Page 11: MOCK PRE-BOARD EXAMINATION MARKING SCHEME (2017-18) … · Ans 216 64 8 ( 2 marks for correct output) 3 (a) Give the SQL command to view the structure of EMP table. 1 Descemp;Ans

11

( ½ mark for Column Names with Data Types)

( ½ mark for Constraints)

(b) Answer the following based on the two tables in a database:

Table: Employee

ENO ENAME SALARY ZONE AGE GRADE DEPT

1 Mona 70000 EAST 40 A 10

2 Muktar 71000 West 45 B 20

3 Nalini 60000 East 26 A 10

4 Sanaj 65000 South 30 A 20

5 Surya 58000 North 30 B 30

Table: Department

DepCode DepName Budget

1 Sales 200000

2 Personnel 150000

4 Accounts 300000

(i) Name the primary and foreign key from the table Employee.

(ii) Write SQL command to change the depname todeptName

(iii) To display ENO, ENAME, SALARY and corresponding DNAME of all

the employees whose age is between 25 and 35

(iv) To display DNAME and corresponding ENAME from the tables

DEPARTMENT and EMPLOYEE.

(v) To display ENAME, SALARY, ZONE and INCOME TAX (Note:

Income Tax to be calculated as 30% of salary) of all the employees with

appropriate column headings.

1

1

2

2

2

Ans (i) Employee table primary key –eno foreign key dept.

(½ mark for each correct answer)

Ans (ii) Alter table department change depnamedeptnamechar(20);

(1 mark for correct query)

Ans Select ENO,ENAME,SALARY,DNAME

from EMPLOYEE E , DEPARTMENT D

where E.DEPT = D.DEPT and AGE between 25 and 35 ;

( 2 marks for correct query)

Ans Select DNAME,ENAME

Page 12: MOCK PRE-BOARD EXAMINATION MARKING SCHEME (2017-18) … · Ans 216 64 8 ( 2 marks for correct output) 3 (a) Give the SQL command to view the structure of EMP table. 1 Descemp;Ans

12

from EMPLOYEE E , DEPARTMENT D

where D.HOD = E.ENO ;

( 2 marks for correct query)

(2 marks for correct query)

Ans Select ENAME, SALARY, ZONE , SALARY * 0.3 INCOMETAX from

EMPLOYEE ;

( 2 marks for correct query)