We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8
Kendriya Vidyala Kolkata Region
Sample Practise Paper (Marking Scheme with Complete Solution)
Informatics Practises (065) 1 Sanjay Gupta wants to upload and download files from / to a remote internet server. 1 a Write the name of the relevant communication protocol, which will let him do that ANS: FTP 1 Which transmission medium should be used to transfer data across two continents at 1 b very high speed. Ans: Satellite 1c Two neighbouring schools at a distance of 120 m from each other , decide to join their 1 LAN using UTP to share their e-learning resources. But they are unable to share the resources due to loss of signal.Which device should they use so that signal is amplified? Ans: Repeater
1 What is the difference between Star and Ring topology? 1
d Ans Star Topology-The topology in which all other nodes are connected to a single central node is called Star Topology Ring Topology – This topology is also known as circular topology. The topology in which each node is connected to two and only two neighbouring nodes is called Ring Topology 1 Identify the wired and wireless technologies from the following : 2 e i) Blue Tooth ii) Optical Fibre iii)Co-axial iv)Infrared Ans: Wired – Optical Fibre, Co-Axial Wireless- Blue Tooth, Infrared 1f i) Distinguish between Open Source and Propriety Software with reference to 2+2 customization of software. ii) Anita says that the following numbers indicate an address: 192.168.0.1 What is the above address called? To which object /device is it assigned? Ans: I) Source Code of Open Source Software is available to the user and therefore the user can customize it according to his/her own requirements and capabilities. Whereas the Source Code of Propriety Software is available, only with its vendor. Therefore it cannot be customized. iii) The above address is called IP Address or Internet Protocol Address, It is a numerical label that is assigned to devices participating in a network 2 I)Help Asmita in identifying the incorrect variable name with justification: 2+2 a i)unit_price ii) Userid iii) tot marks iv)for II)What is the purpose of default clause in switch case? Ans: i)Invalid – for – It is a keyword Tot Marks – No special characters are allowed (blank space in between Tot and Marks) ii)Default clause is used to handle the case when no match of any case is found in the switch statement 2 Rewrite the following program code in Java using switch case statement: 2 b if(grade==’A’) jTextField1.setText(“Distinction”); else if(grade==’B’) jTextField1.setText(“v Good”); else if(grade==’C’); jTextField1.setText(“Pass”); else jTextField1.setText(“Fail”); Ans: switch (grade) { case ‘A’: jTextField1.setText(“Distinction); break; case ‘B’: jTextField1.setText(“Very Good”); break; case ‘C’: jTextField1.setText(“Pass”); break; default: jTextField1.setText(“Fail”); } 2c i) Differentiate between ordered and unordered list. 2+2 ii) Mention the purpose of each of the following HTML tags: <BR>, <L1>, <HR>, <TABLE> Ans: i) <OL> tag is used for defining ordered List. A number or letter is placed in front of every List Item. <UL> tag is used for defining unordered list. A bullet symbol is placed in front of every list items. ii) <BR> To insert a line break. <L1> To define a List Item in an ordered or unordered List. <HR> To place a horizontal line in a HTML document. <TABLE> To create a table in HTML document. 3 Rita is working in the school database. He wants to see what are the tables in the school 1 a database. Which MySql command will he use to see the list of available tables. Ans: Show Tables 3 Write the full form of ½+½ b i)RDBMS iii)TCL Ans: RDBMS- Relational DataBase Management System TCL- Transaction Control language 3c I ) Mr Satyam , a class XI student has just started learning MySql. Help him in 2+2 understanding the basic difference between DELETE and DROP command. II ) Suggest suitable command for the following purpose: i)To create a database named XIICom. ii)To use the database just created by you. iii)To see the structure of the table named Student. iv)To remove the structure of the table named Student. Ans: I Delete is a DML command whereas DROP is a DDL statement. By delete command only certain types of information is deleted depending upon the condition. By drop command the entire existence of the table is removed. i)Create Database XIICom; ii)Use XIICom; iii)Desc Student; iv)Drop Table Student; 3 The students names and marks column of a table “Student” are given below: d STUDENT 4 Name Marks Ritesh 86 Prakshi 65 Rishabh 92 Ranita NULL Based on the above information, find the output of the following queries: i)Select Avg(Marks) from student; ii)Select Marks + 5 from student where marks >90; iii)What is the degree of the above table? iv)What is the cardinality of the above table? Ans i)81 ii)Marks+5 97 iii)2 iv)4 4 Name any two type of Inheritance supported by JAVA. 1 a Ans: i)Single Inheritance II)Multiple Inheritance 4 A phone number, consisting of 10 digits is stored in a string variable strPhone. Now it is 1 b required to store this phone number in a log type variable LngPhone. Write a Java statement to do this. Ans: LngPhone=Long.ParseLong(strPhone); 4c Write the purpose of the following statements. 1 jTextField1.setText(“Foundation”,substring(2)); Ans: Output undation 4 I ) Rewrite the following program code using for loop: 4 d int i=1, sum=0; while(i<10) { Sum=sum+I; i=i+1; } II ) Find the output of the JavaCode snippet after executing of each Java Statement labelled as L1 , L2, L3 and L4. String str=”KOLKATA”, pwd=””; i)Pwd=str.substring(0,2); //L1 ii)Int l=str.length(); //L2 iii)jTextField1.setText(math.round(4.2); // L3 iv)jTextField2.setText(Marh.pow(2,4)+””);//L4 Ans: I) for(int i=1,sum=0;i<10;i++) { sum=sum+I; } II) i)KO ii)7 iii)4 iv)16 4 The following code has some errors. Rewrite the correct code underlying all corrections. 2 e int I,j=5; I==j+5; if(i=j) { jTextField1.setText(“I & j are equal”); { jTextField2.setTeaxt(“They are not equal”); } Ans int I,j=5; I==j+5;//I=J+5; if(i=j)//if(i==j) { jTextField1.setText(“I & j are equal”); } closing bracket missing else // else missing { jTextField2.setTeaxt(“They are not equal”); }
4f The students of “Shiksha Vidyalaya” work for different extracurricular 4+1+
activities like‘community Outreach Program’, ‘Swachh Bharat Abhiyan’ and 1 ‘Traffic Safety Club’. The Programmer at the school has developed a GUI application as shown below: • A student can participate in more than one activities. • Each student gets 10 points for each activity- namely Community Outreach Programme, Swachh Bharat ABhiyan and Traffic Safety Club. Help the programmer to write code for the following: i) When ‘Calculate Total Score’ button is clicked, the points for each activity (that is selected) should be displayed in the text field in from of that activity’s checkbox and theTotal score should be displayed in the appropriate Text field. ii) When Clear button is clicked, all the Textfields and Checkboxes should be cleared. (i) When Stop button is clicked, the application should close. Ans (i) Private void jButton1ActionPerformed(..) { int score=0; if(jCheckBox1.isSelected()) { jTextField3.setText("" + 10); score=sco re+10; } if(jCheckBox2.isSelected()) { jTextField4.setText("" + 10); score=sco re+10; } if(jCheckBox3.isSelected()) { jTextField5.setText("" + 10); score=sco re+10; } jTextField6.setText(""+score); } (ii) Private void jButton2ActionPerformed(..) { jTextField1.setText(""); jTextField2.setText("") ; jTextField3.setText("") ; jTextField4.setText("") ; jTextField5.setText("") ; jTextField6.setText("") ; jCheckBox1.setSelected( false); jCheckBox2.setSelected( false); jCheckBox3.setSelected( false); } (iii) Private void jButton3ActionPerformed(..) { System.exit(0); } 5 While creating a table named “Student”, Mr Ashok got confused as which datatype he 2 a should choose for the column studentname out of char and varchar. Help him in choosing the right data type to store employee name. Give valid justification for the same. Ans: Varchar would be more suitable as it is of variable type datatype whereas char is of fixed size. Students name will be of varying size so for the better utilization of memory space varchar datatype should be used. 5 Shuchi has just created a table Customer containing columns Customer, City, Product. 2 b After creating the table she realized that she has forgotten to add a column phoneno. Help her in writing SQL command to add one more attribute. Ans: ALTER TABLE CUSTOMER ADD (PHONENO VARCHAR(10));
5c Consider the following table :
EMP 4 Empid Ename Desig Salary 1001 Arun Manager 80000 1002 Vishal Salesman 20000 1008 Babita Manager 70000 1004 Sagnick Analyst 81000 1003 Arindam Salesman 30000 Write commands in SQL for (i) to (iv) i)To display the details of those who are Managers by designation. ii)To display the details of those whose name starts with ‘A’. iii)To increase the salary of all salesman by 2000. iv)To display the names of those whose salary is less than 50000. Ans i)SELECT * FROM EMP WHER DESIG=”Manager”; ii)SELECT * FROM EMP WHERE ENAME LIKE ‘A%’; iii)UPDATE EMP SET SALARY=SALARY+2000 WHERE DESIG=”Salesman”; iv)SELECT ENAME FROM EMP WHERE SALARY<50000; 5 Give the output based on the above table: 2 d i)Select Max(Salary), Min(Salary) from EMP; ii)Select Ename from EMP where Desig IN(‘Analyst’, ‘Manager’); Ans: i)81000 ,20000 ii) Arun Babita Sagnick 6 Create a table ITEMS with the following attributes: 2 a Field name Data Type Size Constraint ItemId Integer 5 Primary Key IName Varchar 25 IDescp Varchar 35 PurchaseDate Date Ans: CREATE TABLE ITEMS (ITEMID INTEGER PRIMARY KEY,INAME VARCHAR(25),IDESCP VARCHAR(35), PURCHASEDATE DATE); 6 Consider the following Tables b DOCTOR 2 D-ID D_NAME ADDRESS D01 R P CHOWDHURY 2ND MILE D02 A DASGUPTA MATIGARA D03 VIKAS AGARWAL SHIV MANDIR PATIENT P_NO P_NAME DEPT D_ID P01 ANITA SURGERY DO1 P02 VINITA ORTHO DO2 P03 NITIN SURGERY D01 P04 MUKESH ENT D03 P05 RAMESH ENT D03 i)Identify the foreign key in the table PATIENT. ii)How many rows and columns will be there in the Cartesian Product of the two tables. Ans: i)D_ID ii)15 rows 7 columns 6c Write the SQL queries based on the above tables. 2+2+ i)To display the P_NAME, DEPT and D_NAME. 2 ii)To display the name of Doctors who deal with surgery. iii)To sort the PATIENT table in alphabetical order of P_NAME Ans: i)SELECT P_NAME , DEPT ,D_NAME FROM DOCTOR, PATIENT WHERE DOCTOR- D_ID=PATIENT.D_ID; ii)SELECT D_NAME FROM DOCTOR, PATIENT WHERE DOCTOR.D_ID=PATIENT.D_ID AND DEPT=’SURGERY’; iii)SELECT * FROM PATIENT ORDER BY P_NAME ASC; 7 Write down two benefits of cashless transactions. 2 a Ans: i)Promotes transparency and accountability. ii)Increases ease as most of the transaction can be done from anywhere and at any time. 7 Write the name of two major websites for e-learning 1 b Ans: www.cbse.nic.in ii) www.ncert.nic.in 7c Mr Shubham works in Education Department. He wishes to create controls on Form to 2 collect student information.Write the name of appropriate controls which he can use for it. Sl No Control used to Control 1 Enter name ? 2 Select Gender (Male/Female) ? 3 Select Class & sec ? 4 Submit the Form ? Ans: 1. Text Box 2. Radio Button 3. List Box/Combo Box 4. Command Button