AJANTA PUBLIC SCHOOL Practise paper-2 Important NOTE: while solving all these practice papers whatever difficulties you come across , mark them very carefully and ask when you rejoin class. All the very best for practice. Problems can be many but atleast give a try. Practice makes you perfect. Q.1 What is the purpose of using a MODEM? Q.2 Name the device used to connect a computer to an analog telephone line. Q.3 Compare Co-axial and optical fibre cable.

paltryboarpigΛογισμικό & κατασκευή λογ/κού

3 Νοε 2013 (πριν από 3 χρόνια και 7 μήνες)

76 εμφανίσεις

AJANTA PUBLIC SCHOOL

Practise paper
-
2

Important NOTE: while solving all these practice papers whatever difficulties you come across , mark
them very carefully and ask when you rejoin class. All the very best for practice. Problems can be many
but atleast

give a try. Practice makes you perfect.

Q.1

What is the purpose of using a MODEM?

Q.2

Name the device used to connect a computer to an analog telephone line.

Q.3

Compare Co
-
axial and optical fibre cable.

Q.4

Write two application of Cyber Law.

Q.5

Di
fferentiate between Internet and Intranet.

Q.6

The Great Brain organisation has set up its new Branch at Srinagar for its office and
web based activities. It has 4 Wings of building as shown in diagram:

















Center to centre distances between various blocks


Wing X to Wing Z

50 m

Wing Z to Wing Y

70 m

Wing Y to Wing X

125 m

Wing Y to Wing U

80 m

Wing X to Wing U

175 m

Wing Z to Wing U

90 m


Number of Computers

Wing X

50 m

Wing Y

30 m

Wing Z

150 m

Wing U

15 m

(i)Suggest a most suitable cable layout of connections between the Wings, and the
topology.

(ii)Suggest the most suitable place (i.e, Wing) to house the server of this organisation
with a suitable reason, with justification.

(iii)Suggest the placement of the following device with justification:

(1)Repeater

(2)Hub/Switch

(iv)The organisation is planning to link its head office situated in delhi with the offices
at Srinagar. Suggest an economic way to connect it: the company is
ready to
compromise on the speed of connectivity. Justify your answer.

Wing Z

Wing X

Wing Y

Wing U


Q.7

(a)What will be the contents of jTextField1 after executing the following code:

int a= 1, b=1;

while (a<=5)

{

b=b*a;

a=a+1;

}

jTextField1.setText(“”+b);

(c )What is the purpose
of a button group?


(d)Rewrite the following program code in Java using switch statement.

if(opt==1)

jLabel1.setText(“Square”);

else if(opt ==2)

jLabel1.setText(“Rectangular”);

else if(opt==3)

jLabel1.setText(“Rectangular”);

else

jLabel1.setText(“Wrong
Option”);


(e)The following code has some error(s). Rewrite the correct code underlining all the
corrections made:

Int x, y=40;

Do

{

x =x+5;

y=y
-
10

} while (y>10)


(f)What is the difference between while and do…. While loop?


(g)Rewrite the following progr
am code in Java using Switch statement.

if(grade==’A’)

jTextField1.setText(“Distinction”);

elseif(grade==’B’)

jTextField1.setText(“Credit”);

elseif(grade==’C’)

jTextField1.setText(“Pass”);

else

jTextField1.setText(“Fail”);

Q.8

Consider the following table

STORE Write SQL commands for the statements (i) to (iv)
and

Give outputs for SQL queries (v) to (vii)

Table: STORE

ItemNo

Item

Scode

Qty

Rate

LastBuy

2005

Sharpener Classic

23

60

6

2009
-
06
-
31

2003

Ball Pen 0.25

22

50

25

2010
-
02
-
01

2002

Gel Pen Premium

21

150

12

2010
-
02
-
24

2006

Gel Pen Classic

21

250

20

2009
-
03
-
11

2001

Eraser Small

22

220

6

2009
-
01
-
19

2004

Eraser Big

22

110

8

2009
-
12
-
02

2009

Ball Pen 0.5

21

180

18

2009
-
11
-
03

(i
)To display details of all the items in the Store table in ascending order of LastBuy.

(ii)To display ItemNo and Item name of those items from Store table whose Rate is
more than 15 rupees.

(iii)To display the details of those items whose Supplier code(Sco
de) is 22 or Quantity
in Store(Qty) is more than 110 from the table Store.

(iv)To display Minimum Rate of items for each Supplier individually as per Scode from
the table Store.

(v)SELECT COUNT(DISTINCT Scode) FROM Store;

(vi)SELECT Min(Rate) FROM Store;

(
vii)SELECT MAX(LastBuy) FROM Store;

Q.9

Given the following tables:

TABLE: BOOKS

Book_Id

Book_name

Author_Name

Publshers

Price

Type

Quantity

C0001

Fast Cook

Lata Kapoor

EPB

355

Cookery

5

F0001

The Tears

William Hopkins

First Publ.

650

Fiction

20

T0001

My First C++

Brain & Brooke

EPB

350

Text

10

T0002

C++ Brainwave

A.W. Rossaine

TDH

350

Text

15

F0002

Thunderbolts

Anna Roberts

First Publ.

750

Fiction

50

Note. Book_Id is the primary key.

Book_Id

Quantity_Issued

T0001

4

C0001

5

F0001

2

Note. Book_Id

is the primary key.

Write SQL queries for (a) to (e):

(a)To list the names from books of Text type and quantity issued is more than 2.

(b)To display the Book_Id,Book_Name and Quantity_Issued for all books which have
been issued.(The query will require con
tents from both the tables.)

(c )To display the Book_Id,Book_Name and Quantity_Issued for all books having price
more than 300;

(d)To display the Book_Id,Author_Name and Quantity_Issued for all books whose type
starts with F;

(e)To display the Book_Id,Publ
isher and Quantity_Issued for all books in the
descending order of quantity.


Q.10

What is Primary Key Constraint? Can you define multiple foreign key constraints for a
table?

Q.11

Manager of

Bachat Bank

has developed a java form for finding EMI to be paid by
customers against repayment of loan.


Loan interest rates are(Yearly)
-


Loan Type

Interest Rate

Car Loan. 14.5 %

Personal Loan

13.25 %

Education Loan 11.75 %

Name of the v
arious object
s

in

jframe
are
:

Object Type

Object Name

Description

JFrame

J
FrmEmiCalc

Main Form

Combo Box

j
cmbYears

To select Years for Loan

Text Box

j
txtLoanAmt

To enter loan amount

j
txtProcCharge

To enter processing charge

j
txtRate

To enter interest rate

j
txtEMI

To display EMI payable

Option Button

rbtn
Car

To select loan type as Car Loan

rbtn
Personal

To select loan type as Personal Loan

rbtn
Education

To select loan type as Education Loan

Command Button

j
cmdCalcEMI

To calculate payable amount

j
cmdClear

To clear the entered values

j
cmdExit

To quit form application


a)

Initially loan type should be set to
Car Loan
,
jt
xt
Rate
should

be disabled and
j
cmbYears

should have values 5,10,15, and 20.



b)

If loan amount is less than or equal to 0. It should display an error message
“Invalid Amount” and cursor should point to
j
txtLoanAmt.



c)

When the user clicks the
CmdCalc
EMI
b
utton, the total payable EMI should be
calculated and displayed in the
j
txt
EMI

text box. To calculate EMI, firstly calculate
compound interest using formula ci=p*(1+r/100)^t. Add compound interest to loan
amount and divide by time (in months).


d)
Write the code for
j
CmdExit

button to stop the application and

j
CmdClear

command button to clear all the text boxes, option buttons. Also cursor should point

on
j
txtLoanAmt
test
box
.