GG}D SHEFHEFRD - Good Shepherd

6
-G=, GG}D SHEFHEFRD .-,*, pt BI-IC SCHOOL & JLr1rllOFt C6,L1EGE SECOND TERM EXAMINATION (2019-20) INFORMATICS PRACTICES CLASS: XII Roll No:....... Max.Marks ; 70 Time :3Hours General Instruction: SECTION A 1. a. What was the objective behind developing LTNICODE? b. What is the purpose of a Server in a network? c. Expand the terms: (i) GSM (ii) TCP (iii) CDMA (iv) BoSS d. Distinguish between MAC address and IP address. Give example for each. e. What happens during 'Domain Name Resolution'? f. How Eavesdropping is different from Snooping. Mention any one activity. 2. a. Consider the following table named "GARMENT". Write MySQL commands for (i) to (iv) and output for (v) to (viii) Table:GARMENT GCODE GNAME SIZE COLOUR PRICE 111 T Shirt XL Red 1400.00 tt2 Jeans L Blue 1600.00 1r3 Skirt M Brown 1100.00 tt4 Ladies Jacket XL Blue 4000.00 115 Trousers L Brown 1500.00 116 Ladies Top L Red nu11 (i) To display details of the items whose price has not been decided. (ii) To display the garment name and the price when incremented by 10 percent for those Garments with price less than 1500. (iii) To display the size and the average price for each size in descending order of size. (iv) To change the colour of garment with code as 1 16 to "Orange". (v) Select Count(Distinct Size) From Garment; (vi) select colour, min(Size) From Garment Group By Colour; (vii) Select Gname From Garment Where Size In ('M', 'L') And Price >: 1500; (Viii) Select Colour, Size From Garment Order By Colour, Size Desc; (1) (1) (2) (2) (2) (2) (8)

Transcript of GG}D SHEFHEFRD - Good Shepherd

-G=, GG}D SHEFHEFRD.-,*, pt BI-IC SCHOOL & JLr1rllOFt C6,L1EGE

SECOND TERM EXAMINATION (2019-20)

INFORMATICS PRACTICES

CLASS: XII

Roll No:.......

Max.Marks ; 70

Time :3Hours

General Instruction:

SECTION A

1. a. What was the objective behind developing LTNICODE?

b. What is the purpose of a Server in a network?

c. Expand the terms: (i) GSM (ii) TCP (iii) CDMA (iv) BoSS

d. Distinguish between MAC address and IP address. Give example for each.

e. What happens during 'Domain Name Resolution'?

f. How Eavesdropping is different from Snooping. Mention any one activity.

2. a. Consider the following table named "GARMENT". Write MySQL commands for

(i) to (iv) and output for (v) to (viii)Table:GARMENT

GCODE GNAME SIZE COLOUR PRICE

111 T Shirt XL Red 1400.00

tt2 Jeans L Blue 1600.00

1r3 Skirt M Brown 1100.00

tt4 Ladies Jacket XL Blue 4000.00

115 Trousers L Brown 1500.00

116 Ladies Top L Red nu11

(i) To display details of the items whose price has not been decided.

(ii) To display the garment name and the price when incremented by 10 percent for those

Garments with price less than 1500.

(iii) To display the size and the average price for each size in descending order of size.

(iv) To change the colour of garment with code as 1 16 to "Orange".

(v) Select Count(Distinct Size) From Garment;

(vi) select colour, min(Size) From Garment Group By Colour;

(vii) Select Gname From Garment Where Size In ('M', 'L') And Price >: 1500;

(Viii) Select Colour, Size From Garment Order By Colour, Size Desc;

(1)

(1)(2)(2)

(2)(2)

(8)

b. Consider the table BANK:

ACCNO NAME AMOLINT1 Ashi 30000

2 Bismi 20000

4 Aakash 40000

The following MySQL queries are executed on the above table

SET AUTOCOMMIT:O;INSERT INTO BANK VALUES(5,'Gagan',80000);

COMMIT;UPDATE BANK SET name:'Abhi' WHERE ACCNO:4;SAVEPOINT A;UPDATE BANK SET AMOI.]NT:AMOLTNT-1OOOO WHERE ACCNO : 5;

UPDATE BANK SET AMOUNT:AMOLTNT+IOOOO WHERE ACCNO :4;SAVEPOINT B;

INSERT INTO BANK VALTIES(1,'Babita',45000);

SAVEPOINT C;

ROLLBACK TO B;

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

SELECT * FROM BANK;

3. a. What is MySQL used for? Abhay wants to start learning MySQL. From where can he

obtain the MySQL software?

b. what is the difference between CURDATEQ and DATEQ functions?

c. Table ,SCHOOL'has details about students in a school. One of its columns is 'HOUSE'

that stores the house that the student belongs to. The data in HOUSE column may be

'Nila'/' Pamb a' l'P etiy at' I oKabant'

.

Write SQL query to fetch the number of students in 'Periyar' house.

d. Mr. Jain is using a table STUDENTS with the following columns:

Name, Class, Course Id, Course-Name

He needs to display names of students who have not been assigned any course or have

been assigned Course-Name that ends with 'Science''

He wrote the following command, which did not give the desired result.

(2)

(1)

(1)

(1)

(1) --

SELECT Name, Class FROM Students

WHERE Course-Name:Null OR Course-Name : 0% Science;

Help Mr.Jain to run the query by removing the error and write the correct query.

e. What effect does SET AUTOCOMMIT have in transactions? Q)

f. While creating a table staff, Vinay set the column PostID as the primary Key' Write

the MySQL statement(s) to change the Primark Key to the column SID. Q)

g. Write one similarity and one difference between CFIAR and VARCHAR data types. (2)

a

4. a.

.'

In a databse 'HOSPITAL', atable 'Ward' is created withNumOfBeds as columns and Wardld as the primary key.you could expect to see in the 'Hospital' database, with 3

Primary key and Foreign key in the table that you expect,In a Database, there are two tables given below :

Train

Wardld, WardName,

Write another suitable tablesuitable columns identifring

/

b.(2)

(6)

Reservation

RefNo Trainld Passenger JourneyDates001 4023 Shubham Sineh 20t7-07-02c001 6542 Jishan Mittal 2017-06-25s002 4023 Jessica Rai 2017-07-02P001 9876 Paramieet Sineh 20t7-07-22s003 4023 Guriyot Sineh 2017-07-03c002 6542 Akash Mukhariee 20t7-06-25P002 9876 Meera Devi 2017-07-22L001 3424 Ruby Lal 2017-06-29c003 s400 Tapashree 2017-07-04

Write MySQL query for the following:i) To display TrainID, Train name and the passenger name of all the passengers

who travelled in the month of June.

ii) To display the name of the passengers whose destination is Kolkata.iii) To display the Train name and the number of passengers travelling in the same train.

c. Write MySql command to create the table PLAYER with given constraints. (2)Table : PLAYER

Field Tvpe ConshaintPlayerid Integer Primary keyName Varchar(50)Heieht IntegerDateofBirth Date

5. a. Write one advantage and one disadvantage of e-learning to students. (2)b. What precaution must be taken with regard to making payments while shopping online? (1)

Trainld TName Starine Destination3402 Century Expres,s New Delhi Mumbai4023 Superfast Express Kanyakumari Chandisarh3424 LucknoMail Lucknow NewDelhi6542 Capital Express Chennai Kolkata9876 Puniab Mail Patna Ludhiana5400 Century Express New Delhi Kolkata

3

SECTION B

6. a) while working with Netbeans, Arpita included a TextArea control which

contains a list of sfudents. what code she should write to add one more student name

' at the end of TextArea'

b) Mention any one advantage of Jlist over JComboBox'

c) Name any two common methods of JRadiobutton and JCheckbox'

d) Define Data Abstraction'

7. a) write the output that will be displayed on jlabell and jlabel2'

String a,b,cd,x;

a:"Computers";

b:ttarett;

c="really";

d:"interesting";int e : a.length0/3+b.length0*2;

*:fo+c*dix:a.concat(x);jlabell.setText("The value of e :"* e);

jLabel2. setText(x.toUpperCase0) ;

b) what will be displayed in jTextFieldl and jTextField2 ?

trttx,y,z,t,x: 5;

Y: 8;

,: a+y*y*6;

t:x+Y;j TextF ield 1 . setText(" " + z)\

j TextField2. setText(" " +t) ;

c) write the value of R after the following code is executed'

intP:3,Q:6,R;R:0;if( P >3)p: ft+lielse if ( P <= 3 &&. Q>6)

P:ft+2,elseif(P<3&&Q<7)R: R+3;

else if ( P<3 ll Q <7)

B: ft+4;elsep = ft+5i

(1)

(1)

(2)

(2)

(2)

(2)

(2) _

4

8. a) The following code has error(s). Rewrite the correct code underlining all the

corrections made :

int A assigned 3;

int I, sum: 0;

for {I:1,I(:5,I:I+1}{A: A-2sum: sum t2;jJ

b) Rewrite the following code using while loop.

int ij,k;

i: 30;

j: 1o;

k:0;do

(\

i:i-5;k:k+i;) while (i > j);

j TextF ield 1 .'setText(" "+k) I

c) Write the value of c after executing the following code :

int P;

int R: 8;

int oddNum;

int C:0;for (P : 1; P < R; P:P+3)I\

oddNum :P o/o2;

if (oddNum *: 1)(1

g= e+l;IIlJ

(2)

(2)

(2)

5

a

9. Ms. Fauziaworks as a programmer in "TelTel Mobile Company" where she has designed a

software to compute charges to be paid by the mobile phone user. A screenshot of the same is

Each call is charged at < 1.00. Each sMS is charged at < 0'50.

Users can also opt for Mobile Data Plan. Charges for Mobile Data Plan are flat < 50'00.

Help Ms. Fauziain writing the code to do the following :

(i) when the .calculate Charges' button is clicked, 'calls and SMS Charges"

,Mobile Data plan Charges' and 'Amount to Pay' should be calculated and displayed

oAmount to PaY' is calculated as :

calls and SMS Charges + Mobile Data Plan Charges (if any)

(ii) When the .Clear, button is clicked, all the textfields and checkbox should be cleared.

(iii) when the 'Exit' button is clicked, the application should close.

10. 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, Label and Command Button for the following entries :

(4)

(2)

(1).).

(2)

iet tiiu user enter NAMEI

Iffiil-**" EIoBitENU BER

l-t ttt- "s€fthaose

o*u FftOFESSIOI-{ sut of theies : teashingNon-Teaekim

Tet GYm, Yoga, Table

is. Badmintsn a$d Aersbics. Sllsre than ane

shown below :