Upload
others
View
33
Download
0
Embed Size (px)
Citation preview
KENDRIYA VIDYALAYA SANGATHAN
BLUE PRINT
INFORMATICS PRACTICES – CLASS XII
TOPICS SA(1) SA(2) LA(6) TOTAL Networking & Open 4(4) 3(6) - 7(10)
Source software Programming in Java 7(7) 6(12) 1(6) 14(25)
RDBMS 6(6) 6(12) 2(12) 14(30)
IT Applications 1(1) 2(4) - 3(5)
TOTAL 18(18) 17(34) 3(18) 38(70)
NOTE: Marks are given inside the bracket and the number of questions outside the bracket.
MODEL QUESTION PAPER
SUB: INFORMATICS PRACTICES (065)
CLASS – XII
MM: 70 TIME: 3 Hrs
1 (a) A company has 3 departments namely Administrative, Sales, Production. Out of telephone cable, Optical Fiber, Ethernet Cable, which communication medium is best for high speed communication
between departments?
1
b) Naresh wants to upload/download files from/to a remote internet server. Write the name of the relevant communication protocol, which will let him do the same.
1
(c) Identify the following topologies.
(1) A signal/data packets transmit from one end to other end in linear way.
(2) Each node is connected to two and only two neighboring nodes in circular form.
1
(d) Write any two scripts included in Indian Languages on Unicode. 1
(e) Differentiate between HUB and SWITCH devices. 2
(f) Explain following terms.
(1) Apache (2) Linux
2
g) Explain the term ODF and Ogg Vorbis. What are the advantages of these over others? 2
2 (a) Write the property of the radio button that should be set to make the radio buttons mutually exclusive? 1
(b) Name one container for each of the following categories.
(i) Top level container
(ii) Middle level container
1
(c) Write two examples of empty tag. 1
(d) Which HTML tag and corresponding attributes are used to establish default font size for entire page? 1
(e) How many times does the following loop execute? What is the value of num after the execution?
int num=5;
do
{
System.out.println(“Hello world”);
num--;
}while (num>2);
2
(f) Write a function in java that takes an integer number as parameter and returns sum of its digits. 2
(g) Which tag is used to specify : a. Table data b. Table header c. Table row d. Table border 2
3 (a) Ms. Sangeeta has created a table SUPPLIER in the database. One of the fields in the table is city. Write the command to display city by avoiding duplication.
1
(b) Ms.Astha created a table “BOOK” in MySQL. She forget to set the PRIMARY KEY for the table. Which command should she use to set it for the field “B_id”.
1
c) Sanjay is not able to enter the details of students born after „ 30-Mar-2007‟. Which constraint is applied
as specification when the table was created. 1
d) What is the role of referential integrity w.r.t Foreign key constraint. 2
e) EmpName, Sal of EMP table given below
EmpName Sal
Saravanan 2800
Neethu 3200
Lekshmi 3500
Ganesh 2700
Based on this information, find the output of the following queries.
a) SELECT COUNT(*) FROM EMP WHERE Sal>=3000;
b) SELECT avg(Sal) FROM EMP WHERE Sal <3500;
2
f) What is the significance of DROP DATABASE command? 2
g) A table Employee in a database has 14 columns and 4 records. What is its degree and cardinality if two more rows are added into the table?
1
4 (a) What is an abstract class? 1
(b) Given a string Object namely month having value as “11” stored in it. What will be the result of
following code?
JOptionPane.showMessageDialog(null,“ ” + (month.length() + Integer.parseInt ( month) ) );
1
(c) What will be the content of jTextField1 after executing the following statement?
jTextField1.setText(“Informatics”.substring(3));
1
(d) Rewrite the following program code using if else if statement
switch(ch)
{
case „a‟ : System.out.println(“It is a.”); break;
case „b‟ : System.out.println(“It is b.”); break;
case „c‟ : System.out.println(“It is c.”); break;
}
2
(e) What will be the contents of jTextField1 and jTextFiled2 after executing the following code
jTextField1.setText(Math.round(2.5)+"");
jTextField2.setText("Micro".concat("System"));
2
(f) Find the output of the following program
class MainString
2
{
public static void main(String args[])
{
StringBuffer city= new StringBuffer("Madras");
StringBuffer Str= new StringBuffer( );
Str.append(new String(city));
Str.insert(0,"Central");
System.out.println(Str);
}
(g) Read the following case study and answer the questions that follow.
TCS IT Solution is required to develop a student record. The school offers two different streams,
medical and non-medical, with different grading criteria. The following is the data entry screen used to calculate percentage and grade. * Student can assume name for the controls.
1. Write the code for the Frame Window Activate event to disable the Percentage and the Grade text fields. (1)
2. Write the code for the Clear button to clear all the text fields. (1)
3. Write the code for the Calculate button to calculate the percentage to display in text field after
finding the total marks of first term and second term (assuming that both marks are out of 100). (2)
4. Write the code for the cmdCalcGrade button to calculate the grade to display in text field txtGrade, depending on the stream selected according to the criteria in the following table: (2)
6
5 (a) Differentiate CHAR and VARCHAR data types? 2
(b) Write the output of the following SQL queries.
(i) SELECT CONCAT(LOWER(„Class‟), UPPER(„xii‟));
(ii) SELECT SIGN(2);
(iii) SELECT DAYOFYEAR(„2010-02-13‟);
(iv) SELECT MOD(11,4);
2
(c) Consider the table FLIGHT given below. Write commands in SQL for (i) to (iv) and output for (v) to (vi).
(i) Display details of all flights starting from Delhi.
(ii) Display details of flights that have more than 4 number of flights operating.
(iii) Display flight codes, starting place, destination, number of flights in descending order of number of flights.
(iv) Display destinations along with flight codes of all the destinations starting with ‘A’.
(v) SELECT MAX(NO_FLIGHTS) FROM FLIGHT;
(vi) SELECT START, COUNT(*) FROM FLIGHT GROUP BY Start;
6
6 (a) Write an SQL query to create following table „ Supplier‟ with following descriptions.
Table : Supplier
2
(b) In a Database Company, there are two tables given below : Table : SALES
SALESMANID NAME SALES LOCATIONID
S1 ANITA SINGH
ARORA
250000 102
S2 Y.P. SINGH 1300000 101
S3 TINA JAISWAL 1400000 103
S4 GURDEEP SINGH
1250000 102
S5 SIMI FAIZAL 1450000 103
Table : LOCATION
LOCATIONID LOCATIONNAME
101 Delhi
102 Mumbai
103 Kolkata
104 Chennai
(1) Identify foreign key in SALES table and primary key in LOCATION Table.
(2) Identify all candidate keys in SALES table.
2
(c) Consider the tables Doctors and Patient given below:
Table : Doctors
With reference to these two tables, write a SQL query for (i) and (ii) and output for (iii).
(1) Display Patient Name, Patient No and corresponding doctor name for each patient.
(2) Display the list of all patients whose OPD_days are „TTS‟.
(3) SELECT OPD_days, count(*) FROM Doctors, Patients WHERE doctors.Department =
6
Patients.Department GROUP BY OPD_days;
7 (a) Define an entity. What is meant by entity type and entity instance ? 1
(b) What are the benefits of e-business over traditional business ? 2
(c) Pragati works for a School. She wishes to create controls on a form for the the following functions.
Choose appropriate controls from Text field, Label, Radio Button, Check box, List, Combo Box, Button and write in the third column.
2
INFORMATICS PRACTICES (065)
ANSWER KEY
1 a) A company has 3 departments namely Administrative, Sales, Production. Out of telephone cable, Optical Fiber, Ethernet Cable, which communication medium is best for high speed communication between departments?
Ans- Optical Fiber (1 mark for correct answer)
1
b) Naresh wants to upload/download files from/to a remote internet server. Write the name of the relevant communication protocol, which will let him do the same.
Ans- FTP (File Transfer Protocol) -1 Mark for correct answer
1
c) Identify the following topologies.
(1) A signal/data packets transmit from one end to other end in linear way.
(2) Each node is connected to two and only two neighboring nodes in circular form.
Ans- 1) BUS topology (2) Ring / Circular topology -1/2 Mark each
1
d) Write any two scripts included in Indian Languages on Unicode. Ans- Devanagiri,Tamil,Malayalam,Gujatrati,telugu,assamese etc. -1/2 Mark each
1
e) Differentiate between HUB and SWITCH devices. Ans-Difference between SWITCH and HUB HUB : less speed compared switch. It share bandwidth for connected computers. It has half-duplex (bi-
directional) communication. SWITCH: more speed compared to HUB. It communicate at full bandwidth.It communicate two-way
communication (full duplex).
- each difference ½ mark..
2
f) Explain following terms.
(1) Apache Server (2) Linux
1. Apache web Server is an open source web server available for many plateforms as BSD,Linux etc.
2. It is an operating system. it is free software and open sourse software as it in now freely available
but also it is underlying source code is available to all.
2
g) Explain the term ODF and Ogg Vorbis. What are the advantages of these over others? Ans- ODF (Open Document Format) and Ogg Vorbis.
ODF : Open Document Format is an XML-based file format for representing electronic documents. Ogg Vorbis: It is a new audio compression format which is open format ,developed by Xiph.org.
-each explanation 1 mark.
2
2 (a) Write the property of the radio button that should be set to make the radio buttons mutually exclusive? Ans- ButtonGroup property (1 mark for specifying the correct method)
1
(b) Name one container for each of the following categories.
(i) Top level container
(ii) Middle level container
Ans- (i) Top level container (JFrame or Jdialog) (ii) Middle level container (Jpanel or JtabbedPane) (1 mark for any correct answer)
1
(c) Write two examples of empty tag. <br>, <hr>, <li>, <A> ½ each
1
(d) Which HTML tag and corresponding attributes are used to establish default font size for entire page? <BASEFONT> tag and SIZE attribute (1/2 mark for each correct answer)
1
(e) How many times does the following loop execute? What is the value of num after the execution?
int num=5;
do
{
System.out.println(“Hello world”);
num--;
}while (num>2); Ans -3 times and value of num=2 (1 mark for each correct value)
2
(f) Write a function in java that takes an integer number as parameter and returns sum of its digits.
private int sumofdigit(int n) { int d, sum=0; while(n>0) { d= n % 10; sum= sum + d; n=n/10; } return sum;
} ½ mark for header and ½ mark each for condition test and loop statement and ½ mark for return
2
(g) Which tag is used to specify : a. Table data b. Table header c. Table row d. Table border. a. Table data - <td> b. Table header - <th>
c. Table row - <tr>
d. Table border - <TABLE Border = 2> ½ mark for each
2
3 a) Ms. Sangeeta has created a table SUPPLIER in the database. One of the fields in the table is city. Write
the command to display city by avoiding duplication. Ans- Select DISTINCT city from Supplier. ( 1 Mark for correct answer).
1
b) Ms.Astha created a table “BOOK” in MySQL. She forget to set the PRIMARY KEY for the table.
Ans -ALTER TABLE ADD PRIMARY KEY(B_ID) ; ( 1 Mark for correct answer) 1
c) Sanjay is not able to enter the details of students born after „ 30-Mar-2007‟. Which constraint is applied as specification when the table was created.
Ans- CHECK CONSTRAINT( 1 Mark for correct answer)
1
d) What is the role of referential integrity w.r.t Foreign key constraint.
Ans -Referential integrity ensures the integrity of related tables with respect to insert , delete and update
queries. (1 mark for explanation, 1 mark for mentioning “on delete cascade/on update.. “ in query. )
2
e) EmpName, Sal of EMP table given below
EmpName Sal
Saravanan 2800
2
Neethu 3200
Lekshmi 3500
Ganesh 2700
Based on this information, find the output of the following queries.
a) SELECT COUNT(*) FROM EMP WHERE Sal>=3000;
b) SELECT avg(Sal) FROM EMP WHERE Sal <3500;- - Ans -
a) 2 ( 1 Mark for correct answer) b ) 2900 ( 1 Mark for correct answer)
f) What is the significance of DROP DATABASE command? To remove the DATABASE (2 Mark for explanation and example)
2
g) A table Employee in a database has 14 columns and 4 records. What is its degree and cardinality if 2
more rows are added into the table?
Ans- degree is 14 , cardinality 6 ( ½ mark for each correct answer)
1
4 (a) What is an abstract class? Ans- An abstract class is the one that simply represents a concept and whose objects can’t be created. It
is crated through the use of keyword abstract. (1 mark for correct definition)
1
(b) Given a string Object namely month having value as “11” stored in it. What will be the result of
following code?
JOptionPane.showMessageDialog(null,“ ” + (month.length() + Integer.parseInt ( month) ) ); output : 13
1 mark for correct output.
1
(c) What will be the content of jTextField1 after executing the following statement?
jTextField1.setText(“Informatics”.substring(3));
Ans- Output: ormatics 1 mark for correct output.
1
(d)
Rewrite the following program code using if else if statement
switch(ch)
{
case „a‟ : system.out.println(“It is a.”); break;
case „b‟ : system.out.println(“It is b.”); break;
case „c‟ : system.out.println(“It is c.”); break;
} Ans -if (ch==’a)
system.out.println(“It is a.”); else if (ch==’b’)
system.out.println(“It is b.”); else if (ch==’c’) system.out.println(“It is c.”);
2 mark for correct conversion
2
(e) What will be the contents of JTextField1 and JTextFiled2 after executing the following code
jTextField1.setText(Math.round(2.5)+"");
jTextField2.setText("Micro".concat("System"));
Output: 3, MicroSystem
1 mark for each correct answer.
2
(f) Find the output of the following program
class MainString
{
public static void main(String args[])
{
StringBuffer city= new StringBuffer("Madras");
StringBuffer Str= new StringBuffer( );
Str.append(new String(city));
Str.insert(0,"Central");
System.out.println(Str);
}
Ans- Output: CentralMadras 2 mark for correct answer. 2
(g) Read the following case study and answer the questions that follow.
1. txtPerc.setEnabled(false); txtGrade.setEnabled(false); (1/2 mark each)
2. txtFtMarks.setText(“”); (1 mark )
txtStMarks.setText(“”);
txtPerc.setText(“”);
txtGrade.setText(“”);
3. calculate percentage
int f=Integer.parseInt(txtFtMarks.getText(“”));
int s=Integer.parseInt(txtStMarks.getText(“”));
int total=f+s;
double perc=(total *100)/200;
txtPerc.setText(“”+perc); (2)
4. calculate grade (1+1 for correct coding part in each radiobutton)
double percent=Double.parseDouble(txtPerc.getText());
String grade;
if (rdbMedical.isSelected()==true)
{
if(percent>=80)
6
grade=”A”;
else
if(percent<80 && percent>=80)
grade=”B”;
else
if(percent<60)
grade=”C”;
}
else
if (rdbNonMedical.isSelected()==true)
{
if(percent>=75)
grade=”A”;
else
if(percent<75 && percent>=50)
grade=”B”;
else
if(percent<50)
grade=”C”;
}
txtGrade.setText(grade);
}
5 a) Differentiate CHAR and VARCHAR data types?
Ans-CHAR – Fixed length character ( 1 Mark) VARCHAR – Variable length character ( 1 Mark)
2
b)
Write the output of the following SQL queries.
(i) SELECT CONCAT(LOWER(„Class‟), UPPER(„xii‟));
(ii) SELECT SIGN(2);
(iii) SELECT DAYOFYEAR(„2010-02-13‟);
(iv) SELECT MOD(11,4);
Ans - i) classXII
ii) 1 iii) 13
iv) 3 ( ½ Mark for each correct answer)
2
c) Consider the table FLIGHT given below. Write commands in SQL for (i) to (iv) and output for (v) to (vi). 6
(i)select * from flight where start=”delhi”;
(ii) select * from flights where no_flights>4;
(iii) select flcode, start, destination, no_flights from flight order by no_flights desc;
(iv) select destination,flcode from flight where destination like ‘A%;.
(v) 7
(vi) DELHI 3
MUMBAI 2
KANPUR 1
INDORE 1
6 a)
Write an SQL query to create following table „ Supplier‟ with following descriptions.
Table : Supplier
2
Ans- create table Supplier( filed varchar(5) Primary Key ,
Supp_Name varchar (20) NOT NULL ,
City Varchar (20) ,order_No Integer (10) Foreign Key ,Supp- Amount Decimal(6,2) check Supp_Amount >10000);
b) In a Database Company, there are two tables given below :
Table : SALES
SALESMANID NAME SALES LOCATIONID
S1 ANITA SINGH ARORA
250000 102
S2 Y.P. SINGH 1300000 101
S3 TINA JAISWAL 1400000 103
S4 GURDEEP SINGH
1250000 102
S5 SIMI FAIZAL 1450000 103
Table : LOCATION
LOCATIONID LOCATIONNAME
101 Delhi
102 Mumbai
103 Kolkata
104 Chennai
(1) Identify foreign key in SALES table and primary key in LOCATION Table.
(2) Identify all candidate keys in SALES table.
2
Ans – 1. LOCATIONID
2. LOCATIONID, SALESID
c) Consider the tables Doctors and Patient given below:
Table : Doctors
6
With reference to these two tables, write a SQL query for (i) and (ii) and output for (iii).
(1) Display Patient Name,Patient No and corresponding doctor name for each patient.
(2) Display the list of all patients whose OPD_days are „TTS‟.
(3) SELECT OPD_days,count(*) FROM Doctors, Patients WHERE doctors.Department = Patients.Department GROUP BY OPD_days;
Ans: (a) Select I_Code, I_Name, Model, V_Name from ITEM, VENDOR
Where ITEM.I_Code= VENDOR.I_Code AND I_Name=”Laptop” ;
(b) Select I_Name, Price, V_Name, City from ITEM, VENDOR
Where ITEM.I_Code= VENDOR.I_Code AND Price>15000 ;
(a) Select V_Name, I_Name from ITEM, VENDOR
Where ITEM.I_Code= VENDOR.I_Code AND V_Name=”Big Bazar” ;
7 (a) Define an entity. What is meant by entity type and entity instance ?
Ans-Entity is an object that exists and is distinguishable from other objects. Entity instance is a specific individual thing or object. 1 mark for correct definition
1
(b) What benefits does an e-business offer to the customers?
Reduction in transaction and other costs. Improved customer service 1 mark each for one point.
2
(c)
2