KENDRIYA VIDYALAYA SANGATHAN, CHENNAI REGION CLASS XII COMMON PRE-BOARD EXAMINATION Sub : Informatics Practics (065) Tim allowd : 3 hours Maximum Marks : 70 Instruction : (i) All qustions ar compulsory (ii) Programming Languag : Java and MySQL. (a) Mrs Shasikala is working in an Global Organization. Sh wants to login in his offic computr from hr hom. Suggst th protocol for th sam. (b) Which dvic is usd for conncting multipl ntworks ovr diffrnt protocols? (c ) Idntify th following topologis. () A signal / data packt transmitting from on nd to othr nd in linar way. () Each nod is connctd to two and only two nighboring nods in circular form. (d) Writ any two scripts includd in Indian Languags on Unicod. () Explain following trms. () Apach Srvr () Linux (f) List out any four advantags of Opn Standards. (g) Diffrntiat btwn Ddicatd and Non-ddicatd srvr. (a) Which proprty of th radio button should b st to mak th radio buttons mutually xclusiv? (b) What is th diffrnc btwn <P> and <BR> tag? ( c) Writ som faturs of XML. (d) Which HTML tag is usd to for producing a Radio Button in an HTML form? Writ on xampl. () How many tims dos th following loop xcut? What is its typ (Entry controlld or Exit controlld )? of 7
(f) int x=,y=0; whil( x < = y) { JOptionPan.showMssagDialog(null, + x); } Writ a function in java that taks an intgr numbr as paramtr and rturns its sum of digits. (g) Writ th HTML cod to provid th hyprlink to a wbsit www.kvsangathan.nic.in. 3. (a) How can w s th list of xisting tabls in currnt databas? (b) Whil crating a tabl STUDENT, Kavi forgot to st primary ky for th tabl on ROLLNO ky. Writ th statmnt to st th column MobilNo as th primary ky of th tabl. A studnt of class XII has cratd a tabl PARTICIPANTS. CITY is on of th columns in tabl. Sh wants to find out th nams of participants who hav not com from Mumbai, Dlhi, Ahmdabad. SELECT NAME FROM PARTICIPANTS WHERE CITY HAS NOT Mumbai, Dlhi, Ahmdabad; Find out th rrors and rwrit th abov qury. (d) Prdict th output of th qury: SELECT ROUND(65.95,) - TRUNCATE(65.95,); () Writ th diffrnc btwn Char and Varchar data typs. (f) Writ th MySQL qury to calculat th Cartsian Product of givn two tabls. (g) Considr th tabl HOTEL givn blow: Tabl : HOTEL Room_N o Cust_Nam of 7 Room_Typ Room_Rn t 04 Rajsh Singl 700 308 Anuja Doubl AC 600 05 Vinamra Singl NAC 500 0 Soma Singl 700 Basd on this information, find output of th following quris: (I) SELECT Room_Typ, AVG(Room_Rnt) FROM HOTEL GROUP BY Room_Typ; (II) SELECT Room_no FROM HOTEL WHERE Cust_Nam LIKE %a% ;
4 (a) Dfin Polymorphism concpt in Objct Orintd Programming. (b) (d) () (f) Rwrit th following if ls statmnt using conditional oprator int i=( I am a studnt of Kndriya Vidyalaya.lngth()); if(i>5) Systm.out.println("Abov Avrag"); ls Systm.out.println("Blow Avrag"); Givn a string Objct namly month having valu as stord in it. What will b th rsult of following cod? JOptionPan.showMssagDialog(null, +(month.lngth()+intgr.parsint(month))); Rwrit th following cod using switch: char ch = Charactr.parsCharactr( chartf.gttxt( ) ) ; if ( ch == 'A' ) (ch == ) Systm.out.println( "On" ) ; ls if( ch == 'B' ) (ch == ) ls Systm.out.println( "Two" ) ; Systm.out.println( "Non" ) ; Th following cod has som rror(s). Rwrit th corrct cod undrlining all th corrction mad: int K=; Sum=0; do { Sum=K; K+=; } whil(k=<0); jtxtfild(intgr.tostring(sum)); What will b th valu of P and Q aftr xcution of th following cod: int P,Q=00; for(p=0;p<=;p++) Q+=P; JOptionPan.showMssagDialog(null, P: + P + Q: + Q + ); 3 of 7
(g) Rajani is a programmr in GSoft Ltd. Sh dsignd a GUI to display mploys having salary in th givn rang. Writ th cod for th following ) Mntion th nam of all th componnts usd to crat abov JFram ( ) ) Writ th java statmnts to xcut th qury to display th rcords in th JFram, if th databas nam is Firm and tabl nam is Employ. (4) 3) Display cod for clar and xit buttons () 5. (a) What do you undrstand by primary ky and candidat ky? (b) Writ th output of th following MySQL statmnts : (i) SELECT MOD(ROUND(4.60),5); (ii) SELECT SUBSTR(TRIM( I LOVE PROGRAMMING ),3,5); (iii) SELECT CONCAT( KENDRIYA, VIDYALAYA ) FULL NAME ; (iv) SELECT WEEKDAY(CURDATE()); Considr th tabl STUDENT givn blow, writ MySQL Commands for (i) to (v) and output for (vi) to (viii): Nam Class DOB Sx City Marks Nanda X 6/6/95 M Agra 55 Saurabh XII 7/5/93 M Mumbai 46 Sanal XI 6/5/94 F Dlhi 400 Trisla XII 8/8/95 F Mumbai 450 Stor XII 8/0/95 M Dlhi 369 Marisla XI //94 F Dubai 50 Nha X 8//95 F Moscow 377 Nishant X /6/95 M Moscow 489 4 of 7 6
(i) To display all th information of mals whos city is NEITHER Dlhi or Mumbai. () (ii) To display th dtails of all th studnts whos dat of birth is aftr Nishant s Birth dat /6/95. () (iii) To Display all information about class XII studnts rankwis (dscnding ordr). (/) (iv) List nams of all studnts in agwis. (/) (v) To count th numbr of studnts in XII Class of Mumbai city. (/) (vi) SELECT DISTINCT (Sx) FROM STUDENT. (/) (vii) SELECT AVG(Marks), Class FROM STUDENT GROUP BY class. () (viii) SELECT COUNT(*)FROM STUDENT WHERE Class = XI () 6. (a) Column Nam EmpID EmpNam EmpAdd EmpPhon EmpSal DptID Ky Typ Primary Forign Null/Uniqu Forign Ky Tabl Nam Not Null Uniqu Dpartm nt Forign DptID Ky Column Data typ Intgr Char Varchar Intgr Doubl Intgr Lngth 6 0 30 0 9, Constraint <0000 Crat tabl Employ as pr th abov givn Tabl Instanc Chart. 5 of 7
(b) In a databas thr ar two tabls Books and Issud as shown blow. Books Issud Book_Id Book_nam Quantity Book_Id Quantity-issud C00 Fast Cook 5 T00 4 F00 Th Tars 0 C00 5 T00 C++ 0 F00 T00 VB 5 F00 NtBans 50 (i) Idntify th forign ky column in th tabl Issud. (ii) How many rows and columns will b thr in th Natural Join of ths two tabls? Study th following tabl TEACHER and SALARY and writ th MySQL commands for th qustions (i) and (ii) and giv outputs for MySQL quris (iii) and (iv). Tabl : TEACHER SID NAME DEPT SEX EXPERIENCE 0 Siddhart Computr M h 04 Raghav Physics M 5 07 Naman Chmistry M 0 4 Nupur Computr F 3 09 Janvi Physics F 9 05 Rama Accounts M 0 7 Jams Computr F 3 Binoy Accounts F 30 Samul Computr M 5 6 Tabl : SALARY SID BASIC ALLOWANCE DA 0 000 000 300 04 3000 300 500 07 3000 4000 500 4 000 500 000 09 4000 700 00 05 8900 690 300 30 700 600 300 (i) Display NAME and DA of all staff who ar in Accounts dpartmnt and having mor 6 of 7
than 0 yars of xprinc and DA is mor than 300. () (ii) Display th NAME and SALARY of all staff whos salary is mor than avrag salary. (SALARY=BASIC +ALLOWANCE+ DA) () (iii) Slct NAME, DA, BASIC from TEACHER, SALARY Whr BASIC>0000 and TEACHER.SID=SALARY.SID; () (iv) Slct NAME, DEPT, SEX, BASIC, DA from TEACHER, SALARY Whr DEPT LIKE %o% and DA >=500 and TEACHER.SID=SALARY.SID; () 7. (a) Writ any two social impact of -businss. (b) Dfin front nd of an information systm. Mrs. Ranjta is dvloping a softwar for th Company. Sh wishs to crat controls on a form for th following functions. Choos appropriat controls from Txt fild, Labl, Radio button, Chck box, List box, Combo box, Button and writ in th third column. S. No. Control usd to Control Entr Employ numbr Employ Nam 3 Slct Dpartmnt 4 Slct Managr Nam 7 of 7