You are on page 1of 13

http://www.cbseguess.

com/
Guess Paper CLASS: XII [INFORMATICS PRACTICES] Time: 3 Hours M.M.: 70

1. a. !. c. d. e. f. g .. a. Ms. 'amhita has developed a 1ava application through &hich the students of her school can vie& their mar$s !( entering their admission num!er. The mar$s are displa(ed in various te2t fields. 3hat should she do so that the students are a!le to vie& !ut not change their mar$s in te2t fields. (1 %ifference !et&een 04 and '&itch 'tatement5 (1 3hat is the client server computing5 6an (ou e2ample of a real life situation that uses client server computing5 (. %ifference !et&een +73'8"N and 679'8"N attri!ute. (1 3rite a function in 1ava that ta$e a num!er as parameter and return true if num!er is palindrome other&ise return false. (. 6ompare .:M9 and .6'';%76 4ile in :M9. (1 3hat &ill !e the values of 2 and ( after e2ecution of the follo&ing code: (. int 2;(<0) for(2<1)2=<>)??2 (<2?? ? ??2) --() 3hich command is used in M('@l to change the column name5 (1 3hile creating a ta!le A6ustomerB 'imrita forgot to set the primar( $e( for the ta!le./ive the statement &hich she should &rite no& to set the column A6ust0%B as the primar( $e( of the ta!le5 (1 %efine Transaction5 /ive the name of T69 commands (1 3rite command to add a foreign $e( constraint ( namel( 4CDaddressDpersonDnum to ta!le address so that personDnum field of address !ecomes foreign $e( of num field of person ta!le. Name the protocol used for sending and receiving e-mails. (1 "n organi#ation is planning to lin$ its head office situated in %elhi &ith the office at 'rinagar. 'uggest an economics &a( to connect it) the compan( is read( to compromise on the speed of connectivit(. *ustif( (our ans&er. (1 %ifferentiate !et&een 'T"+T and ,-' topolog(. (1 %ifferentiate !et&een active and passive hu!. (. 'tate t&o reasons for &hich (ou ma( lin$ to have a net&or$ of computers instead of having stand alone computers. (. %istinguish !et&een open source soft&are and proprietar( soft&are &ith respect to initial soft&are license cost. (1 /ive an( t&o 0ndian scripting language. (.

!. c. d. e. f. g.

3.

a. ! c. d.

www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com | www.niosguess.com | www.iitguess.com

http://www.cbseguess.com/
Note : ,oth ta!les alread( created. (1 %ifference !et&een E@ui and Non E@ui *oin &ith the help of suita!le e2ample. ( . %ifferentiate !et&een 67-NT(F and 67-NT(%0'T0N6T . (. 3hat do (ou understand !( 8artial +oll !ac$ing5 (. %ifferentiate !et&een Method 7verloading and Method 7verriding. (1 " phone Num!er ; consisting of 10 digits; is stored in a string varia!le str8hone. No& it is re@uired to store this phone num!er in a long t(pe varia!le lng8hone. 3rite a 1ava statement to do this. (1 /ive the output of the follo&ing statements. (1 a 1Te2t4ield1.setTe2t(0nteger.parse0nt(H.1I?100 ?100 ) !. 1Te2t4ield1.setTe2t(H6,'EJn4inalJtE2amI ) 3hat values &ill !e assigned to the varia!le ua ; u!; uc and fail after e2ecution of the follo&ing program segment: (. int i<0;ua<0;u!<0;uc<0;fail<0) &hile(i=<> K '&itch ( i?? K case 1 :??ua) case . : ??u!) uc??)!rea$) case 3 : case G : ??uc) ua??)u!??)!rea$) default : ??fail) L L 0n *%,6 %ifferentiate !et&een e2ecuteMuer( and e2ecute-pdate statement 5 (1 The follo&ing code has some error(s .+e&rite the correct code underlining all the corrections made: (. int '-M<0;'tep<>) int 0) 4or(i<0)i<=>)??i K 'tep?<>) 'um?<'tep) L 1Te2t4ield1.sho&Te2t(%ou!le.to'tring('-M ) :tra care hospital has computeri#ed its !illing . " ne& !ill is generated for each patient. The hospital allo&s four different t(pes of patients ta$e admission. The dail( charges are !ased on the t(pe of patient. The follo&ing is the data entr( screen used to generate the !ill at the time of discharging the patient.

G.

e. f. g. a. !. c.

d.

e. f

g.

Patient Type
78% 068rivate %ormitor(

Daily Charges
300 G000 .000 1000

www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com | www.niosguess.com | www.iitguess.com

http://www.cbseguess.com/

Control Name
1Te2t4ield1 1Te2t4ield. 1Te2t4ield3 1Te2t4ieldG 1Te2t4ield> 1,utton1 1,utton. 1,utton3 (i (ii (iii (iv

Property Name
Naria!le Name Naria!le Name Naria!le Name Naria!le Name Naria!le Name Naria!le Name Naria!le Name Naria!le Name

Property Value
8NameT4 "d%ateT4 %i%ateT4 %a(sT4 6hargeT4 6lear,TN 6alc,TN E2it,TN

3rite the code for the 6lear,TN to clear all the te2t fields e2cept the %i%ateT4 te2t field. (1 a. %ispla( the '(stem date in %i%ateT4 te2t field. !. %isa!le the %0%ateT4 and %a(sT4 te2t field (1.> 3rite the code for the 6alc,TN !utton to displa( the final !ill amount in the amtT4 te2t field.Note that final !ill amount is calculated as: ( No. of da(s F %ail( 6harges (3 3rite the code for E2it ,utton ( E2it,TN to e2its the application. (1O.

www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com | www.niosguess.com | www.iitguess.com

http://www.cbseguess.com/

>.

(a

(! (c

Ta!le emplo(ee has G records and Ta!le %ept has 3records in it. Mr. /arvit &ants to displa( all information stored in !oth of these related ta!les. He forgot to specif( e@ui-1oin condition in the @uer(. Ho& man( ro&s &ill get displa(ed on e2ecution of this @uer(. (1 3hat is the purpose of %%9 command in M('@l 5 Ho& is it different from %M9 command. (. 3rite 'M9 commands for the statement (i to (iv and give outputs for 'M9 @ueries (v to (viii on !asis of the ta!le 9",.

No ItemName CostPerItem Quantit y


1 . 3
G > P 7

DateO Purchase !arranty Operational

6omputer P0000 Q .1O0>O.00P . 7 8rinter 1>000 3 .1O0.O.007 G . 'canner 1R000 1 .QO0RO.00R 3 1 6amera .1000 . 13O0PO.00P 1 . Hu! R000 1 31O10O.00Q . 1 -8' G000 > .1O0>O.00P 1 G 8lotter .>000 . 11O01O.010 . . (i 'elect the item name purchased after 31O01O.007. (1 (ii To list item name in ascending order of the date of purchase &here @uantit( is more than 3 (1 (iii To count the num!er of items &hose cost is more than 10000 (1 (iv To insert a ne& record in the 9", ta!le . ( "ssumed %ata (1 (v 'elect M0N ( %0'T0N6T @uantit( from 9a!t &here 6ost8er0tem =1>000.(1O. (vi 'elect 67-NT (F ;&arrant( from 9", group !( &arrant(. (1O. (vii 'elect '-M ( %0'T0N6T 6ost8er0tem from paint. (1O. (viii 'elect "N/ ( 6ost8er0tem from 9", &here %ate7f8urchase=B01-01-.00QB . (1O.

P.

(a

(!

6reate t&o ta!les: 6ustomer ( customerDid ; name 6ustomerD'ales ( transactionDid ; amount ; customerDid -nderline columns indicate primar( $e(s and customerDid indicates foreign $e( in customerDsales Ta!le .Ma$e sure that no action should ta$e place in case of a %E9ETE or -8%"TE in the parent ta!le. Name the foreign $e( constraint as f$Dcust. (. 0n a data!ase there are t&o ta!les A97"NB and A,7++73E+B as sho&n !elo&:

"O#N "oan$number %ranch$name


9-170 9-.30 9-.P0 %o&nto&n +ed3ood 8err(ridge

#mount
3000 G000 1700

%O&&O!'&
www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com | www.niosguess.com | www.iitguess.com

http://www.cbseguess.com/
Customer$Name "oan$number
*ones 'mith Ha(es (i (ii 9-170 9-.30 9-1>>

(c

0dentif( the foreign $e( column in the ,7++73E+ ta!le. (1 Ho& man( ro&s and columns &ill !e there in the natural 1oin of these t&o ta!les. (1 6onsider the ta!les 8roduct and 6lient given !elo&:.

www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com | www.niosguess.com | www.iitguess.com

http://www.cbseguess.com/

T",9E : 8+7%-66T

P$ID
T801 430> ,'01 'H0P 431. T",9E : 690ENT

Pro(uctName
Talcom 8o&der 4ace 3ash ,ath 'oap 'hampoo 4ace 3ash

)anu*acture
9"C ",6 ",6 :ST :ST G0 G> >> 1.0 Q>

Price

C$ID
01 0P 1. 1> 1P

ClientName
6osmetic 'oap Total Health 9ive 9ife 8rett( %reams

City
%elhi Mum!ai %elhi %elhi ,anglore 430> ,'01 'H0P 431. T801

P$ID

7.

"ns&er the follo&ing @uestions !ased on the a!ove ta!les: (i To displa( the details of 8roduct &hose price is in the range of >0 to 100 (1.> (ii To displa( the 6lient Name;cit( from ta!le client and 8roduct Name and price from ta!le product; &ith their corresponding matching 8D0%. (1.> (iii To increase the price of all products !( 10. (1 (d %efine a class +eport &ith the follo&ing specification: (G %ata Mem!ers: adno 0nteger name 'tring mar$s > floating points values average average mar$s o!tained getavg( to compute the average o!tained in five su!1ects Mem!er Methods: readDinfo( function to accept values for adno;name;mar$s; and invo$e the function getavg( displa(info( function to displa( all data mem!ers on the screen. (a 3rite three important features of e-/overnance5 /ive -+9 of one of the commonl( used e-/overnance portals5 (. (! Ho& has e-learning !enefitted the common man5 (1 (c "nshul &or$s for a 'ports 6ompan(. 'he &ants to create controls on a form for the follo&ing function. 6hoose appropriate controls form Te2t 4ield; 9a!el;+adio ,utton;6hec$ ,o2;9ist;6om!o ,o2;8ush ,utton and &rite in the third column.(. '.No. 1 . 3 G 6ontrol used to: Enter Team Name Enter 'ports T(pe Enter Num!er of Mem!ers To save the details 6ontrol

www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com | www.niosguess.com | www.iitguess.com

http://www.cbseguess.com/

www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com | www.niosguess.com | www.iitguess.com

http://www.cbseguess.com/
/uess 8aper 69"'': :00 U0N47+M"T06' 8+"6T06E' V Time: 3 Hours

+et: % M.M.: 70

1. ( a (! (c (d (e

(f (g (h

3hich protocol is used for the access the remote computer application. (1 %ifferentiate !et&een M"6 and 08 address. (1 %efine repeater. /ive the name of t&o t(pes of repeater. /ive the steps %omain Name +esolution. (. 3hat t(pe of net&or$ &ould (ou suggest for follo&ing t(pe of re@uirements of an organi#ation. (1 i "round .00 computers in t&o different !uildings ad1acent to one another are to !e connected. ii The cost of net&or$ should not !e ver( high. iii 0t should !e fairl( eas( to implement. %ifference !et&een /uided and -nguided media. . (. 6ompare and contrast : (. i TT4 and 7T4 ii 'tatic and %(namic fonts 3rite in brief the purpose of the following Terms: (1)
(i) OGG (ii) O !

.. a. !. c. d. e. f. g. 3hich method &ould (ou use to determine &hich inde2 has !een selected in a list5(1 %ifferentiate !et&een &hile and do &hile statement 5 (1 3hat is the client server computing5 6an (ou e2ample of a real life situation that uses client server computing5 (. %ifference !et&een T",9E and 47+M tags. (1 3rite a function in 1ava that ta$e a num!er as parameter and return true if num!er is prime other&ise return false. (. 3hat is rules for &ell-formed :M9 documents. (1 3hat are the output of the follo&ing t&o code fragements5 *ustif( (. 1. int 1<1;i<.) &hile(??i=> 1F<i) '(stem.out.println(1 ) .. int 1<1;i<.) doK 1F<i) L&hile(??i=> '(stem.out.println(1 )

www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com | www.niosguess.com | www.iitguess.com

http://www.cbseguess.com/
3. a. ! 3hich command is used in M('@l to close an e2isting data!ase HMem!erI5 The EName column of a ta!le 6ustomer is given !elo&: (1 (1

CName
Camal Cunal /arvit +a1iv +ohit Chushi 'onu ,ased on the information; find out the output the follo&ing @ueries : (i 'E9E6T Ename from emplo(ee &here Ename li$e AWoW) (ii 'E96T Ename from emplo(ee &here Ename li$e AWiDB) " ta!le HTransportI in a data!ase has column 3 and ro& R.3hat is the cardinalit( and %egree in it. (1 3rite command to add a foreign $e( constraint ( namel( 4CDaddressDpersonDnum to ta!le address so that personDnum field of address !ecomes foreign $e( of num field of person ta!le. Note : ,oth ta!les alread( created. (1 %ifference !et&een E@ui and and natural 1oin (. 3hich t&o statements complete a transaction5 (6hoose T&o (. a. delete emplo(ees) !. descri!e emplo(ees) c. roll!ac$ to savepoint c) d. alter ta!le emplo(ees modif( column sal) e. select ma2(sal from emplo(ees &here departmentDid<.0) 3hat do (ou understand !( "60% properties of data!ase transaction5 (. %efine "!stract class and 0nterface5 . (1 " phone Num!er ; consisting of 10 digits; is stored in a long varia!le lng8hone. No& it is re@uired to store this phone num!er in a 'tring t(pe varia!le str8hone. 3rite a 1ava statement to do this. (1 3rite the purpose of the follo&ing statements. (1 a 1Te2t4ield1.setTe2t(%ou!le.parse%ou!le(1Q0?I001I ?001.11 ) !. 1Te2t4ield1.setTe2t(H6,'EJn4inalJtE2amI ) 3hat values &ill !e assigned to the varia!le ua ; u!; uc and fail after e2ecution of the follo&ing program segment: (. int i<0;ua<0;u!<0;uc<0;fail<0) &hile(i=<> K '&itch ( i?? K case 1 :--ua) !rea$)

c. d.

e. f.

G.

g. a. !. c.

d.

www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com | www.niosguess.com | www.iitguess.com

http://www.cbseguess.com/
case . : ??u!Oua) case 3 : case G : ??uc O uc--) !rea$) default : ??fail) e. f L L %ifference !et&een *%,6 and 7%,6 5 (1 The follo&ing code has some error(s .+e&rite the correct code underlining all the corrections made: (. 0nt sum<0;'TE8<>) int 0) 4or(i<0)i<=>)??i?? K 'tep?<>) 'um?<'tep) L 1Te2t4ield1.sho&Te2t(dou!le.to'tring('-M ) Mr %as is &or$ing as a 6hief 0nformation 7fficer in "M% constructions compan(. 0n the month of *anuar( he received a letter from the management to store all his emplo(ee information in electronic form. He decided to develop a small soft&are application to store emplo(eeBs personal data. He instructed one of his 1uniors to ma$e a from in 1ava s&ing to enter emplo(ee information. The 1unior presented the follo&ing form to Mr. %as .

g.

www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com | www.niosguess.com | www.iitguess.com

http://www.cbseguess.com/

Control Name
1Te2t4ield1 1Te2t4ield. 1Te2t4ield3 1Te2t4ieldG 1+adio,utton1 1+adio,utton. 16hec$,o21 16hec$,o2. 16hec$,o23 1,utton1 1,utton. 1,utton3

Property Name
Naria!le Name Naria!le Name Naria!le Name Naria!le Name Naria!le Name Naria!le Name Naria!le Name Naria!le Name Naria!le Name Naria!le Name Naria!le Name Naria!le Name

Property Value
NameT4 4NameT4 MNameT4 "ddressT4 4emale+, Male+, 0nter6! /raduate6, 8ost/raduate6, 6lear4orm,TN 6lose4orm,TN 'u!mit%etail,TN

a. 3rite a code snippet on a action event of 6lear4orm,TN !utton to clear te2tfield o!1ects;set default choice in the radio !uttons to female and clearing all chec$ !o2 control. (1.> !. 3rite a method pro6hec$Mualification to !e called in su!mit !utton action event. The procedure code &ill perform follo&ing action: 0f the chec$ !o2 8ost/raduate6, is chec$ed then the procedure &ill automaticall( chec$ the chec$ !o2es /raduate6! and inter6, irrespectivel( of their initial state . similarl( if the chec$ !o2es /raduate6, is chec$ed then inter6, should also !e automaticall( chec$ed. (. c. 3rite a method proc6onvertcase to convert all the emplo(ee details in NameT4; 4NameT4; MNameT4 and "ddressT4 to uppercase characters. (1.> d. 3rite the code for 6lose4orm,TN to e2it the application. (1 >. (a Ta!le emplo(ee has G records and Ta!le %ept has 3records in it. Mr. /arvit &ants to displa( all information stored in !oth of these related ta!les. He forgot to specif( e@ui-1oin condition in the @uer(. Ho& man( ro&s &ill get displa(ed on e2ecution of this @uer(. (1 (! 3hat is the purpose of /+7-8 ,S command in M('@l 5 Ho& is it different from *70N .E2plain &ith suita!le e2ample. (. (c 3rite 'M9 commands for the statement (i to (iv and give outputs for 'M9 @ueries (v to (vii on !asis of the ta!le Mar$et Ta!le : M"+CET No +hop$Name +ale #rea Cust$Percent &ating City 1 +adha /ifts .>0000 3est PR.P 6 %elhi . 8eterEngland 0.00 'outh R1.R " 6hennai 3 +oc$ 7n 300000 North 7Q.R , "miritsar G 'ports Cing 3R0000 North null , ,aroda > ,is&as 'tores Null East Q..0 " %ehli P ,ig ,a#ar .Q0000 'outh PP.7 " Col$ota

www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com | www.niosguess.com | www.iitguess.com

http://www.cbseguess.com/
i ii To displa( num!er of shops in each "rea in ascending order. (1 To displa( name and customer percentage of all the shops having average custDpercent more than Q0. (1 To displa( Min;Ma2;"vg sale in each cit( and arrange these record according to their rating. (1 To displa( a report &ith shopDName;"rea and +ating for each shop in the ta!le; for onl( those shops &hose sale is not !et&een .>0000 and 3>0000. (1 'elect count(custDpercent from mar$et) (1O. 'elect avg(distinct sale fro mar$et &here +ating<B"B) (1O. 'elect Ma2(%istinct'ale from mar$et &here cit(<B%ehliB) (1O. 'elect count( %istinct cit( from mar$et) (1O. 6reate t&o ta!les: 6ustomer ( customerDid ; name 6ustomerD'ales ( transactionDid ; amount ; customerDid -nderline columns indicate primar( $e(s and customerDid indicates foreign $e( in customerDsales Ta!le .Ma$e sure that no action should ta$e place in case of a %E9ETE or -8%"TE in the parent ta!le. Name the foreign $e( constraint as f$Dcust. (. 0n the data!ase there are t&o ta!les 8roductD'aleD%etail and 0temD%etail as !elo&: T",9E 8roductD'aleD%etail No PName +Name Qty Price City 81 ,read ,ritenia 1>0 R.00 %ehli 8. 6a$e ,ritenia .>0 .0.00 Mum!ai 83 6offee Nescafe 170 G>.00 Mum!ai 8G 6hocolate "mul 3R0 10.00 %elhi 8> 'ouce Cissan G70 3P.00 *aipur 8P Maggi Nestle 3G0 10.00 Col$ata 87 ,iscuit Marie >P0 .1.00 6hennai 8R *am Cissan ..0 G0.00 %ehli 8Q 8i$ni$ 3G> >.00 Col$ata T",9E : 0temD%etail No IName City 01 ,read %ehli 0. 6a$e %ehli 03 6offee Col$ate 0G 'auce *ai0ur Ho& man( ro&s and ho& man( columns &ill !e there in the -nrestricted *oin or 6ross product of these t&o ta!les. (1 0dentif( the foreign $e( column in !oth ta!les. (1

iii iv v vi vii P. (a

(! sho&n

i ii (!

6onsider the follo&ing ta!les ; item and customer . &rite 'M9 commands for the statements (i to (iii . T",9E : 'EN%E+

www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com | www.niosguess.com | www.iitguess.com

http://www.cbseguess.com/
+en(erID N%01 M-0. M-1> Nd>0 +en(erName + *ain H 'inha '. *ha T 0rased +en(er#((ress .; "!c "00ts 1.; Ne&to&n ..O"; 0ar$ 'treet 1..-C '%" &ec#((ress >;central "venue 11P; " vihar ."; "ndheri East ,>; 6 ' Nihar 13;! Ma(ur Nihar +en(erCity Ne& %elhi Mum!ai Mum!ai Ne& %elhi &ecCity Col$ata Ne& %elhi Mum!ai Mum!ai Ne& %elhi

T",9E : +E6000ENT &ecID +en(erID &ecName C00> N%01 +. ,a10a(ee N%0R M-0. '. maha1an M-1Q N%01 H 'ingh M-3. M-1> 0 C '&am( N%GR N%>0 H tri0athi i

7.

To dis0la( the sender Name;cit( from 'EN%E+ ta!le and +eci0ient Name and address from ta!le +E6000ENT (1 ii To dis0la( the num!er of sender in each reci0ient cit(. (1.> iii 3rite a @uer( to dis0la( num!er of reci0ient of each sender. "rrange the list in ascending order. (1.> (d %efine a *ava class 3or$er &ith the follo&ing s0ecification: (G Data )embers: &no integer &name 'tring hr&r$;&grate float ( hour &or$ed and &age rate 0er hour tot&age float(hr&r$ F &grate )ember )etho( 6alc&g( " function to find hr&r$ F &grate &ith float return t(0e. 0nDdata( a function to acce0t values for &no;&name;hr&r$;&grate and invo$e calc&g( to calculate tot0a(. 7utDdata( a function to dis0la( all the data mem!ers on the screen (a 3rite three im0ortant features of e-9earning5 /ive -+9 of one of the commonl( used e-9earning 0ortals5 (. (! Ho& has e-,usiness !enefitted the common man5 (1 (c /arvit is creating a form for her 0ractical file. Hel0 her to choose most a00ro0riate controls from 9ist ,o2; 6om!o ,o2; Te2t4ield; Te2t"rea;+adio ,utton; 6hec$ ,o2; 9a!el and 6ommand ,utton for the follo&ing entries from user. (. i " message HEnter Mar$s H in front of a Te2t 4ield. ii "n input to choose more than one su!1ect from a set of choices. iii "n input to entering remar$s. iv "n input for accepting /ender. Paper +ubmitte( %y: Name "a,man +ingh %hati 'mail la,man-./01gmail.com Phone No. 2342.45334

www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com | www.niosguess.com | www.iitguess.com