You are on page 1of 14

'f

1,.

UNI!:ilRSITy c,F COLC,I43O, SRi LAiyrL4


I'ACIji,T 1, JF SCIENCE

vE+l ExAMiIriaTro.N ri\


scrriNcE - SEMESTER
CS 2001 - Nefworji Technotogies

i,fngp,,.H
:'

ir'r':

- 200lna0s

(Thrc'-'IIours)

Ansgf Al-!.-gg9$&gg
Non-programmabie ralcu!:r lors are
allowed
ii

--

Yqer!'^u'r

T-ffi'j:::

...,{iu
:,;;il
iraj):r consisis ci fwo Faii.'r (?art rr
jlef;vork
rechro.ogies and
part l,,ji:
ard p"rt
l:r:"':,:;:,:,.::1,1Fr:rs,(?arr A- ivef;york Techro.cgies
MCes ir sy.ructu#H;il,,*i$i

. TyjtC Questions.
ii :u*ttr;,e::Prtgrantming,'|.a--"HF"*H;;';;;t
of Pdgcs',..14

INDE}I NO:

l__]_t_*l__l__l__lr
---r
I 4r\^/^.2\.r\/

Ncfwork Technologies -part

:..;i.

Question 0l
I.

.::
of des' . a unlversitv
,,izrr
n
university
-^r-.vride
v''ide
nefwork
for the:,i
Univeniq- o{
Universitr.
thel
o1A cnln,',,r.,n
Tr,^ *^_
fglj"g_3
CoiomUr. d;
;;;';rs'rrrB

ll. Yqu have bcen giveri the


task

##.
a'

l:':'

c".';ffi;i

"*",,ffi

: ":g.roaj
the Network
Network pp"ratrng centcr
"il"^"^*,

i;;;;;i1i"iJ?l[ltTia[':e network as ';'


rocario#*i;lti" uoc discuss
j;'J,fl;i"T.*,
l^:1::f"t ;!;{3rynt
iusfifv wn,,, i,i:i
; il ;' ;;ffi xT: x ; ffi : :1T:: and
lx'_
u.n fi
belowl.
il H,i,;r
s-

..1
- e{tcmal environmentalfactors
'suirable

o
topology
n cgst effectiveness
r bandwidth
" ..number of users
iii.

,',.

:.

The Univc...sity of Colombo has common


places for stuCents
gym ,librLriqs etc.). Discuss

how you are going tn


to those pirces (statc any assumptions).
"

" Question

i.

02

p-riJ.

(canteens,

thc Internct facilities

State the basic require ments of


succcssful communication
and explain on of thern.,l,

:.

briefly one briefl/.

ii'
'..;" iii'

iv'

Discuss ihc irn;ortance of Fourier


components in rnaking up
a digiral signal.
Discuss t'he need of rnodulatiorr in
data comrnurricatio' and
describe one

what is your solution fcrr extcnding

thc maximurn length r,f a


used in data communication in
an unavoidabre situation?

urp

cable that is

, u' Dcs$lbc ilr Thrce wny ll,ntlvhnkc Moclranlsrn iu rlutt cornrnunlcution.


.

vi'
":

vii.

Briefly ditcuss the importance in crror


dctection and vv.rvvuvrr
conection iir
ur uirta
s.tu

communication.

calculafe i'.,; llamrning code fo,r.i,r0jjt0'


(use
Assuming rhat you have recejved, the.
llarlming 7/4 mechanism).
uu-minicodc,
briefly exprain how the
corrcction mechani.sm is perfonncd if
thcrc ;., nn irrn, in rhc receivccl
bit.

#{
li?
ol

NE

I lPl

ll

rc

JL-61
il-Ttr )
!t - lr-a
lr-r

\,F

d'

tl<
lr+
___._

-\_

/cr '>

/E/

aJ,

Al

tr
IJ

$
.r\

r,tcl'ttri Itrr;1il':llll il)il:g -l'::rt I)

Q:.ies:ion 03
I

')
Whrrt ilolcs thc Ibllowing coc!c do

i.

"'ltr>':it nitntc:"tcxt">'r/ ;'tcxt<r'tt>"

(a) Only {nttcrlirrc.s "tcxt"


(b) Crcatc! an ancltor and unclcriillcs "tcxt"
(c) Cieates an anchor and italicize "text"
(C) CrcatJs a link and unclcrlii.)es "tcxi"
(e) C:irtes a link onlY

If thc fcrllowing progran is cxpectcd to display tltc currcnt yenr, nlonth, date,
achieve
minutc, and seionci, rvhich cithc foliowinr-l statclnenUs is/arc nccdcd to

ll.

rciul'
<script lan guage:'J avascriPt">
(a) ncw . new DateQ;
(b) do .urncnt.write(year.gctFullYcar$+"Ycar");
i.j Oo.uhant.rvrite(irorv.gctMontltQ,l."i\4onth",now-1 ctDatcg,"datc");.,.
inutcs0,"mintttc");
iOi Uo.ur.nt.\ Titc(hour.gcti iotlrsg,"ltottr",hour.gctlr
i.i Ab.''n'.nt.writc(now' getSccontls;()"'sccond");

</scripP

'

Which of thc follo',ving is/arc incorrcct in a JavaScript'/


(a) abc=20-10;
(b) _uhc=30-5;
(c) $abc:40-2;

iii.

(d) n:r50-10;
(e) #sum:30+30;
I

iv.

What would be the output of the following code?

100- i 0i2 is

'il';

iifi;t':lfn*t 'r'c;ii

be the o,tpu'r

cf rhe fiiic"ving codc?

j,-

ccllspacittg=rrl" ccllp::cldi:'g:"19"t
LJtuuI- I wv'
r"" (tglie \;:d,il= "'^116''
t/.7o tlrCcr:"l"
_/r \

\ -...
\

v.ii-\.

tg

>
: "><<iiv aii gn=" centet">Nurnbers<'cii

<lir>
<.ir> <td>Cdc</td>

<rd>Even</td>
</Lr>

(urble>

techriclogy?
siatement ls incorrect regariing intemct
Apache is the r,lost popular web scn'cr
r'PHP is an Olen sourcc language
i'fHp is mainly focused on scryer-side scripting
.!
inux an'J'nrairv unix
includi.g
jr;ft
ryit.rr,
opcraring
*"ior
Ji
r"
ur.c

;;. )
i variants

iift4ysQL is u;ed lbr ciatabase handling


hitn or,tt. followirrg staten:ent/s is/are

tfffp
I,fi,j

gg'!

web seryer sends only


scipt is always invisible to a client browser as the
in' esp scripr to the client browsei.

il;, ft;;;;y
are not browser dcPcnded

scripG
[iiP lt* conrPlied binaries
?HP suPPorts rnanY databascs
'PHP is Fr re

\/J:i

(l) Targct:;llili-(l

b:qin ii'il.h an i:nclcrsccre (*) arci, arc'scd


to toaapai
groups c 1- lraiics.
(b)
: 'i'irc i.i.sc;- rirrc'rish..rri rord rhc ricsignarcci
d tk:cumerits
rro
-i;!anx
in a d
Ltnl:atnct
irn
l:ar;i cC',.,,i
!',r,i tir,rtio
lr;'"',,
i',,.

(.)
(d)

-l
I
I

.l
1

I
I
I

,l

tx.

(.)

'iI

;i^.j,l,T:,'::"::::l:llrl:t

ii
loaci tlrc ctocunrcrrr in n differcn, rru*#
f"o-.i

elernenr thai ;eieis to rhis targci,


ioad tne ooc*menr i'to the i*r.ai$
FRAMESE'I- parcnt of the current framc.
slioutd
origi
r5rt.l
"t.nt to lolg.lh: documcnt into the tull,, vr
'fhis valrre is cqui'arc:nt
',r-11'.Ii:i:":
_sr:rf if trre cur:rent framc has no parent.

-ta; fi;;;; ";.'r;;ffi

(a)
(b)
(c)

<FCN f facc= '.arial"> lvfy First


Web pagc</Font>
<FONT size = ,.16"> My First Web page"<lFon>
<iroN-i- color: ,,ic(i') iWy First
Web paqeVFont>

wlitca singlc tag rvitli rnurripre aftributes


and (c) above.

Florv do you crcatc this output in


I

to get the same output as sh

I,IIML? \/riie O"r:

rhe tags in the

Ob.;cctivcs

l.

Lesson Onc
, Scction I
ii. I-csson 'I'rvc
2. Ovcrvicrv
a
a

Part A
Part B

l)art A
Piul I]

u
.f
f
iir

fir,,

i 4,

ci

s' c i e ri rc

aii*vers it,v of

C o I c rn b t'
'ii.t
.', i:

nte 'rl:s code that l:nks an cxtcrnal CSS filc 'style23.css' in a l-lTN{L page'

is Lsxti) for ihc lbllowing styles

'::..1.rt
i:l.t;).

,'.; -'.r

.::.i.*il

ia

' .t

lr

tr

'I
r.,., "t "'

.{*,irt

i,j;,::

6..

i.t.', ,
r;1 "

.!.:
::".,
;1

t; :

,..

lr."

;i. :i

;i"

l.',:;!

tl

{'

<hmr1>

<hca:>
<iitle>caic.htnii <iiilc>
<fi:cad>
<body>
<script I a:tguagc='Javescript">

<i-for (i: 1; i<l50; i++;1


i{ (i%1.1==0){
docunic n t. rwi tc (i, ", ";;
)
)

</scr-ipP
</body>
<I..ir-:il>

lr'lUitl" ,i\i-

L_

___l

tt
tt

tii
'!l__J

- <i-lTMLl
.r {?php
,l. .,lage =, dci
;

..::
r:

*:ho 't <U,!>i

am St:.,;e yea;s

oid(/H1>\:r";

are actions tlrat usually occur as.a'result of sor^rethir-ig a user does, such as
rihich of the fbllowing is not * nsusi event?
t:'..

floi:Click

r)'cnLbad

':I i.
" ):'.i

onMouseCver
'onMouseOut
oncoto

.r:ji

{ch of thg"fuilcwing statemcrUs is/arc incorrect regarding thc HTML tag?


:.,i;..

'a
.

Pg,is lirglc-bytc UPPIIRCASE/lowcrcasc lctters encloscd by "<" and'>"


pittes do noi nced by a single-byte space
o.f tag is useci before a character string and a closing tag is used after it.
iITtFf tr,; dcfincs thc titlc of thc Wcb pagc
NT FACE="--') cicf,nes the font Type

!'ffi

:t

,,):t

(1)

2)

//
<J)>You

.r

i5)

re ';he (?php

Iace thc cach of the follolving


,here n ccesss ry ('l'o Do tlr is. . .

$court; '2>-th gue.st to t

r:chr>

iltnr."tt

Write the Correct


here

lose the file


j'Increr,ent the nunber
ir-

'.

r\:l'te i-ne new nJinber


the nunber fronr the file
n "count . txt " fiie
Go to the begi nn1ng of f ite
F.eac

v.

write dor{n thc output of thc lollowing code using the layout given
<HTML>
<

itoDY>

<P>Enter

thc

yea

r you born<,/p>

<P)Year: <INPUT t-ype="text" i<.-'y()ar"></P>


<IIJPUT type="buEton". va-1 ue="OK" onCLig[=,,getA9 O ; "
<HR.>
z?nFn
-.t,..|/

if (isset($_GE?["y"] ) )
echo "Your age is " ,
(

qate

("Yt') -

$_eSf ["yttJ ;

?>
<-/ rlVU! )
z

/-^^i'\

<SCRI

?T language= " -- vaScr j.pt " )

funciion getAgeO i
location.href = "JavaPHP.php?y=" + year.valuel
.

</scn r PT>
< / tl'lt;t'>

;ii,

tl'
i!r;

'rii
,l

l0

11i

.:

:llcr 'Jre

.'

lce'you

born

Fts

"bt"*h"
grancn

Branch'

No.

Jakartg
Surabrye

J
4

2002-0$'^,,

45

ll

ft#l

Medan
Mal(as38r

Writc dt',r'i: i!'rc I)lii) cotic lo displitv all rcc


givcn bclo.''"

vll.

o
o
o
o
o

,,:|,:l

il.q

lli a t,rvi ySQL tabie

rrsirfl
.
'

.11

.,i;

..-l

, ,ii

host-nainc : loc:rlhtlsl

i'1

,!

'*

&r\
r"{
.41

uscr-nanle : root

'

.c:t

Passwoid:" "

'i.,i)

',*

databasc-namc :PhYsica12006

a,

t1

tabie-namc ;PhY-scicnce

';ti
.i

The coclc should t'rc stntcturcd as follorvs;

i
i

a.

/* Conncct to My'SQI- databa-set/

b.

ti

c.

*/
G"tnttmbcr ol records lotrncl

/+ l.l.xccutc S()1, cortrrrtnrrd

,l
I

.l
I

I
I

t-

I
I

t2

l
1r\iil'.,\l'ro
illli--

:' '

l*O,;tput rcsults as I

'l

'TMI'table*/

-{

l
I

r3
I

I i

\ j_j

1T,'l*nx
i iT'Vl1, rtr

rvO

prcdrrct tne follorving outpui

l.Iecoe:
i
I

Sex
I
I

I
I

V&crc do you

L;re?

C rlombo

l.Kandy lGailc

I\_,iCuncel i I Sena j

L-

| - "':'

14

You might also like