KENDRIYA VIDYALAYA OCF AVADI, CHENNAI REGION
CLASS XII – IST PRE-BOARD EXAMINATION 2015-16
INFORMATICS PRACTICES (065)
– (MARKING SCHEME)
Time
Allowed: 3 Hours Maximum
Marks: 70
Instructions:
(i) All questions
are compulsory.
(ii) Programming
Language : Java, SQL
|
1.
|
(a)
|
Which
protocol is used for transfer email on internet?
Ans: SMTP
(1
Marks)
|
1
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(b)
|
Arun
established networking in his company. But he is unable to receive the
signals from his server room to sales office, which distance is 150 meters.
Suggest the devices to solve this problem.
Ans: Repeater
(1
Marks )
|
1
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(c)
|
Write
the name of the unit of measurement for the information carrying capacity of
a communication channel.
Ans: Baud
(1
Marks )
|
1
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(d)
|
Write
the name of the computer which is used to provide the services to other
computers.
Ans: Server
(1
Marks )
|
1
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(e)
|
What
is an IP address? Write is example.
Ans: The
IP address refers to the unique address which is assigned to a computer on
the TCP/IP network to identify the computer on network. It has 4 or 6 parts.
Range of each part is 0 to 255.
For
example :
198.240.10.40
(1 Marks for correct definition)
(1
Marks for any example )
|
2
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(f)
|
What
do you understand by firewall?
Ans: The
system designed to prevent unauthorized access to or from a private network
is called firewall.
( 2
Marks for correct answer)
|
2
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(g)
|
What
are different font categoriesbased on the technical specifications? Give any
one example of each.
Ans: Fonts
can be categorized on the basis of two parameters:
(a) On the basis of technical
specifications.
(i)
True Type Font
(ii)
Open Type Font
(1/2
Marks for each categories)
(1/2
marks each for correct example)
|
2
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
2.
|
(a)
|
Jilani
wants to display two radio buttons for male and female, such that if any of
them is selected, the other gets deselected automatically. What would you
suggest her to do?
Ans :
She
should put all the radiobuttons in a ButtonGroup.
or
A
ButtonGroup should be used. (1 Mark)
|
1
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(b)
|
How
one can make a JButton disabled so that it can not be clicked? Write example.
Ans :
By using the setEnabled( ) method like:
jButton1.setEnabled(
false ) ;
(1/2 Mark can be given for only specifying the
method name)
(If
example statement is given full 1 Mark can be given)
|
1
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(c)
|
Which
HTML tag is required to display text in Bold. Give one example.
Ans :
<B> tag is required. (1/2 Mark)
e.g.:
<B> Student </B> (1/2 Mark )
(or
full Mark for only example)
|
1
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(d)
|
What
is root element in XML?
Ans :
The parent element of all other elements in data instance is known as root
element or document element.
or
Root
element is the element in XML which contains all other elements.
or
All
the elements or tags are contained in a single element called as root
element.
(1
Mark for correct similar ans)
|
1
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(e)
|
What
will be the value of i and j after the execution of the following code:
int i
= 2 , j = 6 ;
for (
int n = 1 ; n <= 5 ; n++ )
{
i++ ;
j-- ;
}
Ans
:
i
= 7 (1 Mark)
j
= 1 (1 Mark)
|
2
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(f)
|
Explain
the difference between empty element and container element in HTML. Also give
example.
Ans :
(1
Mark for difference, 1 Mark for example)
|
2
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(g)
|
Write
code in java that takes two Strings from textfields t1 and t2 and display
them joined together in a third textfield t3.
Ans :
String
str1 = t1.getText( ) ;
String
str2 = t2.getText( ) ;(1/2 Mark for getting text from both t1 & t2)
String
str3 = str1 + str2 ; (1 Mark for
joining String )
t3.setText(
str3 ) ; (1/2 Mark for
setting text in t3 )
|
2
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
3.
|
(a)
|
Ramesh
has created a table SUPPLIER in a database. One of the columns in the table
is City. Which keyword is used to display only unique City names from table?
Ans:
DISTINCT
(1
marks)
|
1
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(b)
|
Sunil
decides to delete Age column from a MySQL Table (student) after inserting
some data into the table. Write the command to delete that particular column
in student table.
Ans: Alter Table student
Drop Age;
(1
marks for Alter table command and 1 marks for Drop command)
|
2
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(c)
|
Reshma
, a student of class xii has created a table “PARTICIPANTS(PNO, NAME, CITY,
CLAS )”. She wants to
find out the names of participants who are not from Mumbai, Delhi and
Ahmedabad. She tried the following:
SELECT
NAME FROM PARTICIPANTS WHERE CITY HAS NOT Mumbai, Delhi, Ahmedabad;
Find
out the errors and rewrite the above query after correction.
Ans:
SELECT NAME FROM PARTICIPANTS WHERE CITY NOT IN(‘Mumbai’, ‘Delhi’,
‘Ahmedabad’);
OR
Ans:
SELECT NAME FROM PARTICIPANTS WHERE CITY
NOT LIKE(‘Mumbai’,’ Delhi’, ‘Ahmedabad’);
(1
marks for chose correct LIKE or IN operator and 1 marks for use the single or
double quot.)
|
2
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(d)
|
Ram
is not able to repeat a name in the NAME field of the STUDENT table. What is
the constraint he has used to achieve this?
Ans:
Primary key or Unique Constraint
(1
marks for any correct constraint name)
|
1
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(e)
|
What
is the Cardinality and Degree in MySQL.
Ans:
Cardinality: No. of Rows(tuples)in a relation(table)
Degree:
No. of Columns(Attributes)in a relation(table)
(½
mark for each correct definition )
|
1
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(f)
|
How
a delete command different from drop command?
Ans:
Delete is a DML category and drop is a DDL category command.
(½
mark for each correct answer)
|
1
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(g)
|
Find
out the outputs based on the student table
(I)
SELECT TRUNC(AVGMARK) FROM student WHERE
GRADE=’B’;
Ans:
(II)
SELECT
LEFT(STREAM,2) FROM student WHERE AVGMARK > 80;
(1
marks for each correct answer)
|
2
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4.
|
(a)
|
What
is method overloading in java?
Ans: Two
or more methods having the same name in a class, (1/2 Mark)
but
having different number/types of argument. (1/2 Mark)
|
1
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(b)
|
Assuming
rs is the ResultSet object being loaded with the query result, write a
statement in java to move the ResultSet cursor to the last record.
Ans: rs.last(
) ; (1 Mark)
|
1
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(c)
|
What
will be displayed in jTextField1 after executing the following statement:
jTextField1.setText(
"Hello".equals( "Hello" ) + "" ) ;
Ans:
true (1 Mark)
|
1
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(d)
|
What
will be displayed in jTextField1 and jTextField2 after the following code is
executed:
int
s = 4 , k = 8 ;
jTextField1.setText(
"" ) ;
jTextField2.setText(
"" ) ;
while(
s < k )
{
String
str1 = jTextField1.getText( ) ;
String
str2 = jTextField2.getText( ) ;
jTextField1.setText(
str1 + " , " + s ) ;
jTextField2.setText(
str2 + " , " + k ) ;
s++
;
k--
;
}
Ans: jTextField1 = ,4,5
jTextField2 = ,8,7
(1 Mark for each )
|
2
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(e)
|
Rewrite
the following code using switch:
char
ch = Character.b
System.out.println(
"One" ) ;
else
if( ch == 'B' )
System.out.println(
"Two" ) ;
else
System.out.println(
"None" ) ;
Ans: char ch = Character.parseCharacter(
charTF.getText( ) ) ;
switch( ch )
{
case
'A' : System.out.println( "One" ) ; break ;
case
'B' : System.out.println( "Two" ) ; break ;
default
: System.out.println( "None" ) ;
}
(1/2 Mark for using break, 1/2 Mark for using default, 1 Mark for remaining part)
|
2
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(f)
|
Following
code has some error(s). Rewrite the correct code underlining all the
corrections made:
int a , b
for( a = 0 ; a =! 3 ; a++ )
{
sum += a ;
}
cTF.setText( String.toString( sum ) ) ;
Ans: int a , b ;
int sum = 0 ;
for( a = 0 ; a != 3 ; a++ )
{
sum += a ;
}
cTF.setText( Integer.toString(
sum ) ) ;
(1/2 Mark for each
of 4 corrections)
|
2
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(g)
|
Arun
is designing the following GUI form:
![]()
Answer
the following based on the above GUI:
i)
Write java code to make the resultTF uneditable.
ii)
Write java code for the following:
Get
the numbers from textfields ATF and BTF and also the operator from the
textfield opTF and perform the operation. Display the result in the textfield
resultTF.
iii)
Write java code for the following:
When
clearBTN is clicked it should clear all the textfields and the focus should
be given to the textfield ATF (ATF should have the cursor).
Ans:
i)
resultTF.setEditable( false ) ; (1 Mark)
ii)
int a = Integer.parseInt( ATF.getText( ) ) ;
int
b = Integer.parseInt( BTF.getText( ) ) ; (1
Mark for getting a&b)
char
ch = Character.parseCharacter( opTF.getText( ) ) ; (1/2 Mark for getting operator)
int
c = 0 ;
switch(
ch )
{
case '+' : c = a + b ; break ;
case '-' : c = a - b ; break ;
case '*' : c = a * b ; break ;
case '/' : c = a / b ; break ;
} (1
Mark for correct switch or if-else)
resultTF.setText(
c + "" ) ; (1/2
Mark for result display)
iii)
ATF.setText( "" ) ;
BTF.setText(
"" ) ;
opTF.setText(
"" ) ;
resultTF.setText(
"" ) ; (1 Mark for setting
blank string )
ATF.requestFocus(
) ; (1 Mark for requestFocus( ) )
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
5.
|
(a)
|
Why
aggregate functions are called so? Write the Name of some aggregate
functions.
Ans:
MySQL provides Aggregate or Group functions which work on a number of values
of a column/ expression and return a single value as the result. Some of the
most used aggregate function s in MySQL are: MIN(), MAX(), AVG(), sum(),
count().
(1
marks for correct definition and 1 mark for correct aggregate function
names.)
|
2
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(b)
|
Write
the output of the following SQL statements :
(i)
Select char(66) as ‘Char’;
Ans: Char
B
(ii)
Select Concat(“amit”,”jain”) “FullName”;
Ans:
(iii)
Select lower(“Jayant Kumar”);
Ans: jayant kumar
(i)
Select left(“Informatics Practices”,5);
Ans: Infor
( 1/2
mark for each correct answer)
|
2
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(c)
|
Write the SQL
commands for the i) to iv) and write the output of the v) on the basis of
table STUDENT.
TABLE: STUDENT
(i)
Select all the Nonmedical stream students.
Ans: SELECT * FROM
STUDENT WHERE Stream = ‘Nonmedical’;
(ii)
List the names of those students who are in class 12
sorted by Stipend.
Ans: SELECT Name
FROM STUDENT WHERE Class Like ‘12_’ ORDER BY Stipend;
(iii)
List the Name, Grade, Class of students sorted by
AvgMark in descending order.
Ans: SELECT Name,
Grade, Class FROM STUDENT ORDER BY Avgmark DESC;
(iv)
Display the Name, Stipend, Stream and amount of stipend
received in a year assuming that the Stipend is paid every month.
Ans: SELECT Name,
Stipend, Stream, Stipend*12 AS ‘Year Amount of Stipend’ FROM STUDENT;
(v)
Give the output of following SQL
statement:
(a)
SELECT TRUNCATE(AvgMark,0) FROM Student WHERE
AvgMark<75;
Ans: 67
(b)
SELECT ROUND(AvgMark) FROM Student WHERE Grade=’B’;
Ans:
(c)
SELECT CONCAT(Name, Stream) FROM Student WHERE Class
=’12A’;
Ans:
(d)
SELECT RIGHT(Name, 2) FROM Student WHERE stream = “Humanities”;
Ans:
(1 marks for each
correct query and ½ marks for each
correct output)
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
6.
|
(a)
|
Create
table Employee as per following Table Instance Chart.
Ans: CREATE TABLE Employee(
EmpID
INT(6) PRIMARY KEY,
EmpName
CHAR(20) NOT NULL,
EmpAdd
CHAR(30),
EmpPhone
INT(10) UNIQUE,
EmpSal
DOUBLE(9,2),
DeptID
INT(2),
FOREIGN
KEY(DeptID) REFERENCES Department(DepID));
(1
marks for correct create table definition 1 marks for correct foreign key
definition.)
|
2
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(b)
|
In a
database there are two tables ‘Customer’ and Bill as shown below:
Table:Customer
Table:Bill
(i)
How many rows and how many columns will be there in the
Cartesian product of these two tables?
Ans: Row= 15 and
Column=7
(ii)
Which column in the Bill table is the foreign key?
Ans: CustID
(1
marks for each correct answer)
|
2
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
(c)
|
Write
SQL Commands for the statement (i) to
(iv) and give outputs for SQL queries(v) to (viii).
TABLE: SENDER
TABLE: RECIPIENT
(i)
To display the names of all senders from Mumbai
Ans: SELECT
SenderName FROM SENDER WHERE SenderCity= ‘Mumbai’;
(ii)
To display the RecID, SenderName, SenderAddress,
RecName, RecAddress for every recipient
Ans: SELECT RecID,
SenderName, SenderAddress, RecName, RecAddress FROM SENDER, RECIPIENT WHERE
SENDER.SenderID= RECIPIENT.SenderID;
(iii)
To display Recipient details in ascending order of
RecName
Ans: SELECT * FROM
RECIPIENT ORDER BY RecName;
(iv)
To display number of Recipients from each city
Ans: SELECT
RecCity, COUNT(*) FROM RECIPIENT GROUP BY RecCity;
(v)
Select DISTINCT SenderCity From Sender;
Ans: New Delhi
Mumbai
(vi)
Select A.SenderName, B.RecName From Sender A, Recipent
B where A.SenderID = B.SenderID AND B.RecCity = ‘Mumbai’;
Ans: A.SenderNameB.RecName
R Jain H Singh
S jhaP K Swamy
(vii)
Select RecName, RecAddress from Recipient where RecCity
NOT IN(‘Mumbai’,’Kolkata’);
Ans:RecNameRecAddress
S Mahajan 116, A Vihar
S Tripathi 13,B1 D, MayurVihar
(viii)
Select RecID,RecName From Recipient where SenderID =
‘MU02’ OR SenderID = ‘ND50’;
Ans:RecIDRecName
ND08 S Mahajan
ND45 S Tripathi
(1
marks for each correct query and ½
marks for each correct output)
|
6
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
7
|
A
|
What
is an interface?
A
user interface is collection of techniques, styles, mechanisms etc. to
interact with something.
(1
marks)
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
b.
|
Define
a front-end of an information system.
This
is the user interface that the user sees and which is responsible for
interacting with the user. The front end is responsible for receiving user’s
queries, requests etc and passing it over the back-end. The front – end
basically includes graphical user interfaces and the input forms, through
which users interact with the system. The interface allows users to issue
commands to the system and view the results, and in case of the input forms,
enter and modify data.
(2
marks for correct answer)
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
c.
|
Vineeth developing one application for Sales Department.
He want to create some controls on a form for the following functions. Choose
appropriate controls from Text field, Text Area, Label, radio button, check
box, list box, combo box, button, Option pane, dialog box, menu items.
|
|

No comments:
Post a Comment