Informatics Practices Sample Paper

Winter Break Home Assignment 2012
Class – XII
Subject – Informatics Practices
TIME : 3 Hrs
MAX. MARKS : 70
Instructions:
i) All questions are compulsory.
ii) Answer the questions after carefully reading the text
Q.1 (a)
Name the protocol used for sending and receiving e-mails.
(1)
(b)
What does the last three byte of MAC address indicate?
(1)
(c)
Identify the topologies used for the following
(1)
i)
In it the nodes from a circular path for data to travel and each node is connected
to two other nodes.
ii) Each node is connected on single transmission cable and data transmit from
one end to other end
(d)
Give an advantage of using Star Topology over Bus topology. Show a network layout of (2)
Star topology to connect 6 computers
(e)
ABC Pvt Ltd established a Computer laboratory in their premises with 100 networked (2)
computers. Suggest them the solution for the following problems:
i) They are unable to transfer data properly to a server room situated 130m from the
computer lab. Suggest a device that will allow proper communication between the
server room and the Computer lab.
ii) They want to connect to Internet through their ISP. Suggest them a device needed to
connect to Internet through a telephone line.
(f)
What is the difference between a Worm and a Trojan?
(1)
(g)
Expand and give description of following terms
(2)
i)
Q.2 (a)
FLOSS
ii) OSI
While working in Netbeans, Ms Urvashi wants to display „Cleared‟ or “Re Attempt (1)
Required‟ message depending the marks entered in jTextField. Help her to choose
more appropriate statement out of „If statement‟ and Switch statement
(b)
Differentiate between a Text Field and Text Area.
(1)
(c)
Write HTML code for the following :
(1)
To provide a hyperlink to a web site “http://www.kvpanbari.org”
(d)
Differentiate between <HR> tag and <BR> tag?
(1)
(e)
Which attribute of <Body> tag is used to set the background color?
(1)
(f)
What is difference between jRadioButton and jCheckBox?
(1)
(g)
Write Java code that takes value for a number (n) in jTextField1 and cube (n*n*n) of it (2)
to displayed in jTextField2.
Page 1 of 5
(h)
Will the value of Y be the same for the two cases given below?
(2)
(given the value of X is 10)
i)
Q3 (a)
Y= ++X;
ii) Y=X++;
Why do we use ROLLBACK statement? Explain in brief with the help of an example.
(2)
(b)
Write MySql command to open an existing database.
(1)
(c)
What are joins? Why are they used?
(2)
(d)
A table student has 4 rows and 2 columns and another table teacher has 3 rows and 4
(1)
columns. How many rows and columns will be there if we obtain the Cartesian product
of these two tables?
(e)
In a student table, out of Rollnumber, name, address and city which column can be set
(1)
as primary key and why?
(f)
Explain the Primary key, Alternate key, Foreign key and Candidate key with the help of
(3)
suitable example of each.
Q.4 (a)
(b)
Define Inheritance with reference to object oriented programming.
(1)
What message will be displayed after the execution of the following code?
int age=64, relaxation=4;
(2)
int modiage=age-relaxation;
if (modiage<60)
jOptionPane.showMessageDialog(Null, “Not Eligible”);
else
jOptionPane.showMessageDialog(Null, “Eligible”);
(c)
Rewrite the following program code using if statement
switch (number)
{
case 1:
jLable2.setText(“digits”);
break;
case 10:
jLable2.setText(“Tens”);
break;
case 100:
jLable2.setText(“Hundreds”);
break;
case 1000:
jLable2.setText(“Thousands”);
break;
default:
jLable2.setText(“error”);
}
Page 2 of 5
(2)
(d)
(2)
Rewrite the following code using while loop:
int i = 2 ;
do {
System.out.println(“
”+i);
i += 2 ;
} while ( i < 51 ) ;
System.out.print(" Thank You " ) ;
(e)
How many times does the following loop get executed?
(1)
int k=5;
int m=36;
while(k<=m)
{
k+=6;
}
(f)
The following code has some error(s). Rewrite the correct code underlining all the (2)
corrections made:
int i, j=5;
i==j+5;
if(i=j)
{
jTextField1.setText(“i and j are unequal”);
jTextField2.setText(“they are not equal”);
break;
}
else
(g)
jTextField1.setText(“i and j are equal”)
KV Panbari uses the following interface built in java to check the eligibility of a student
for a particular stream from science, commerce and humanities. The user first enters
the total percentage and selects the desired stream by selecting the appropriate option
button. An additional 5% is marks is given to students of NCC.
Write Java Code for the following:
i) On the Action event of the close button the application gets closed.
Page 3 of 5
(1)
ii) On the Action event of the clear button all the text fields and the check boxes get (1)
cleared.
iii) On Action event of the button „Calc Percentage‟ Net percentage of the student is (3)
calculated and displayed in the appropriate text filed. Net percentage is same as that
of the actual percentage if the student doesn‟t opts for NCC otherwise 5% is added
to actual percentage.
Q5. a)
Explain the purpose of DDL and DML commands used in SQL. Also give two example (2)
of each.
b)
Table School has 4 rows and 5 columns. What is the cardinality and degree of this (1)
table?
c)
Consider the table EMP given below. Write command in MySql for (i) to (vi) and output
for (vii) to (viii).
Table: EMP
Empid
101
102
103
104
105
106
Empname
Gaurav
Samim
Roshan
Mimosa
Irfan
Priyanka
City
Guwahati
Dehradun
Delhi
Dehradun
Pune
Guwahati
Date_app
2/9/2008
10/10/2007
5/11/2005
9/9/2007
14/11/2009
10/10/2009
Post
Manager
LDC
UDC
Manager
UDC
PA
Dept
Account
Production
Sales
Purchase
Production
Purchase
(i) Show the employee id, employee name and city of all the employees.
(ii) Show the employee name and post who have joined on 10/10/2007.
(iii)Show details of all the employees whose basic salary is more than 20000.
(iv)Show the employee name and city whose post id LDC and basic below 10000.
(v) Show the empname and date of appointment whose basic is between 15000 and
25000.
(vi) Show the details of the employees whose names are ending with “a”.
Q.6 a)
(1)
(1)
(1)
(1)
(1)
(vii) Select MIN(Basic) from EMP where city= “Dehradun”;
(viii) Select Count(distinct( City)) from EMP;
(1)
(½)
(½)
Write an SQL command for creating a table STUDENT whose structure is given below:
(2)
FIELD NAME DATATYPE SIZE CONSTRAINT
b)
Basic
25000
9000
12000
20000
14000
14000
Rno
Number
3
Class
Varchar
5
Percentage
Number
5,2
Projno
Number
6
Address
Varchar
30
Primary Key
>0 and <=100
Default Hyderabad
In a database there are two tables „LOAN‟ and „BORROWER‟ as shown below:
Page 4 of 5
LOAN
BORROWER
Loan_number
Branch_name
Amount
Customer_Name
Loan_no
L-170
L-230
L-260
Downtown
Redwood
Perryridge
3000
4000
1700
Jones
Smith
Hayes
L-170
L-230
L-155
(i) Identify the primary key column in the table LOAN.
(ii) How many rows and columns will be there in the natural join of these two
tables?
(iii) To increase the loan amount by 2% of amount of all loan numbers
(iv) Write a query t add a column Interest with data type float in the borrower table.
(1)
(1)
(1)
(1)
c)
Consider the tables PEOPLE and PROPERTIES given below:
PEOPLE
Name Phone
Aisha 9411223344
Karan 9422114455
Rosy9433112244
PROPERTIES
PID SPID Farm_Name
PID
1
2
3
11Old house farm
32Nanada‟s farm
33Will‟s farm
34Tall farm
45The florist
With reference to these tables, write command in SQL for (i) and (iii) and output for (iii)
(i)
Display the name and phone number of each person who has a farm.
(1)
(ii)
Display the farm name of farm(s) owned by Rosy.
(1)
(iii)
SELECT Name,Phone,Farm_Name FROM PEOPLE Left join PROPERTIES
(2)
On PEOPLE.PID = PROPERTIES .PID;
Q.7 a)
Write two major websites for E-learning
(1)
b)
How has our society benefited from E-governance? Write two points.
(2)
c)
Write two advantages of e-Business sites.
(1)
d)
What control will you suggest for the following inputs:
(1)
S.No.
Control Used to
Control
1
One out of many choices
2
Typed text(Single Line)
3
Typed text which should remain hidden
4
Multiple items from a group of names

Page 5 of 5