Problem Solving
Problem Solving
Problem Solving
SCI
ENCE
I
ntr
oduct
iont
oPr
obl
em
Sol
vi
ng
CSC1302
18
Int
roduct
ion
Problemsareatthecenterofwhatpeopleencounterinthei
reverydayli
fe.Whet hery
ou
aresolvi
ngapr obl
em forauni v
ersit
ycourseassi gnment,supporti
ngt hosewhoar e
solv
ingprobl
ems,ordiscoveri
ngnewpr obl
emst osol v
e,theprobl
emsy ouf acecanbe
l
argeorsmall,
simpleorcomplex,andeasyordiff
icult
.
WhatisaPr oblem?
Weuset hewor dprobl
em t
odescrbeawi
i derangeofsi
tuat
ionsofdif
fer
entimpor
tance,
fr
om t
hei r
ri
tati
onofdiscover
ingt
hatt
hecarbat
ter
yisf
lat,
totheli
fethr
eateni
ngfai
lur
e
ofanair
craftenginei
nmid-ai
r.
“Problemscanbedef i
nedbr
oadl
yassit
uationsinwhichWeexper
ienceuncer
tai
ntyor
dif
ficult
yinachi
evi
ngwhatwewanttoachieve”
OR
“Problem canbedef
ineasanobst
acl
ethatremainsperpl
exi
ngunt
ilsol
ved”
Stoppingsmokingisaprobl
em wheny oudecideyouwantt ostopbutcannot.
Acomput ermalfunct
ionisaproblem i
fitpr
event
sy oucompl et
ingworkont i
me.
Anexcessi veworkl
oadisapr oblem whenitint
erfereswit
hy ourabil
it
ytowork
ef
f ect
ivel
y.
Poorcommuni cati
on is a problem when itr educes t
he ef f
ici
ency ofan
or
gani zat
ion.
GENERALSTEPSOFPROBLEM SOLVI NG
StageOne:Ident
ify
ingtheProblem
Beforebei
ngabletoconfrontapr obl
em itsexist
enceneedstobeident
if
ied.Thismight
seem anobv i
ousst at
ementbut ,qui
teof ten,pr
oblemswillhav
eani mpactf orsome
ti
mebef or
et heyarerecognizedorbr oughtt otheatt
enti
onofsomeonewhocando
anythi
ngaboutthem
StageTwo:Str
ucturi
ngthePr
oblem
The second stage of t
he pr
oblem solv
ing pr
ocess i
nvol
ves gai
ning a deeper
underst
andi
ngoftheprobl
em.Fi
rst
ly,
fact
sneedtobechecked.
Thequest
ionshav
etobeasked,isthestat
edgoalt
herealgoal?Aret
hebarr
ier
sactual
barr
ier
sandwhatotherbar
ri
ersarether
e?I nt
hisexample,t
heprobl
em atf
ir
stseems
tobe:
Examplesofsimpleprobl
emsandsol
utions;
Example:Carolhaswr i
tt
enanumberpat ter
nt hatbegi
nswi t
h1,3,6,10,15.I
fshe
cont
inuesthi
spatter
n,whatar
ethenextfournumbersinherpatt
ern?
Sol
uti
on:
UNDERSTAND:
Whatdoyouneedt ofi
nd?
Youneedtof i
nd4number saft
er15.
PLAN:
Howcany ousol v
ethepr obl
em?
Youcanf indapat t
ern.Lookatt henumbers.Thenew numberdependsupont
he
numberbeforeit.
SOLVE:
Lookatt
henumber sinthepatt
ern.
3=1+2( star
tingnumberi s1,add2tomake3)
6=3+3(
star
ti
ngnumberi
s3,
add3t
omake6)
10=6+4(
star
ti
ngnumberi
s6,
add4t
omake10)
15=10+5(
star
ti
ngnumberi
s10,
add5t
omake15)
Newnumber
swi
l
lbe
15+6=21
21+7=28
28+8=36
36+9=45
Probl
em
Yousav e$3onMonday .Eachdayaftert
hat
,yousavetwi
ceasmuchasyousav
edt
he
daybefore.I
fthi
spat
ter
ncontinues,
howmuchwoul dyousav
eonFri
day
?
Sol
uti
on
UNDERSTAND:
Youneedtoknowt haty ousave$3onMonday .Theny
ouneedtoknowthatyoual
ways
savet
wiceasmuchasy oufi
ndthedaybef
ore.
PLAN:
Howcany ousol
vet hepr obl
em?
Youcanmakeat ableliketheonebel
ow.Li
sttheamountofmoneyyousaveeachday
.
Remembertodoublet henumbereachday.
Yousav
e$48onFr
iday
Exampl e:
Laurahas3gr eenchips,4bluechipsand1redchipinherbag.Whatfr
act
ionalpar
tof
thebagofchi psisgreen?
Soluti
on
UNDERSTAND:
Whatdoy ouneedt ofi
nd?
Youneedt of indhow manychi psar einal
l.Thenyouneedt ofi
ndhow manyoft he
chipsaregr een.
PLAN:
Howcany ousol v
ethepr obl
em?
Youcandr aw api cturetoshow theinf
ormati
on.Thenyoucanuset hepi
ctur
et ofi
nd
theanswer .
SOLVE:
Draw8chi ps.
3/
8oft
hechi
psar
egr
een.
Thef i
rststrategyyoumi ghtt r
ywhensol vingpr oblem i scal l
edheurist
ics.Heur i
sti
csar e
generalstrategiesusedt omakequi ck,shor t
-cutsol utionstoproblemst hatsomet imes
l
eadt osolut i
onsbutsomet i
mesl eadtoer r ors.Heur isticsaresomet i
mesr eferr
edt oas
ment alshor t
-cuts,andweof tenform t hem basedonpastexper iences.Youhav e
probablyusedheur i
sticsallthet i
meiny ourdai l
ylife,may bewit
houtknowi ngwhatt hey
arecalled.Forexampl e,wheny ougot ot hest oret obuyapr oduct,therewi llprobably
besev eralopt ionsont heshel f
.Whent ryi
ngt odeci det hequalit
yoft hedi ff
erent
choicesmanypeopl euset heheur i
sti
cr ule,'yougetwhaty oupayf or,'meani ngmor e
expensiveitemswi l
lbeofhi gherquali
ty.Whi let hi
smi ghtbet r
ueinmanycases, i
t'
snot
necessaril
yal way strue.So,usi ngthisst rategydoesmakef oraqui ckdeci sionbuti t
couldbackf i
re.Thef ollowingar eHeuri
sticSt rategies
Sol
uti
on
Example2
Asnailiscl
i
mbi ngupadrai
npipe.Eachdayt hesnai
lcl
imbs8.
5meters.Ev
eryni
ghti
t
rai
ns,however
,andwhenitr
ainsthesnai
lsl
ipsbackdown1met er
.Howmanydayswil
l
i
ttakethesnai
ltoreacht
hetopofthedrai
npipe,whi
chis45meter
shi
gh?
Example3;
Handanwantst
omakesoup.Ther eci
pesayssheshoul
duseoneliterofwater
,butshe
doesnothaveaone-li
tercontai
ner.Shehasaf iv
e-l
i
tercont
ainerandat hree-
li
ter
cont
ainer
.Howcansheusethesetwocontai
ner
stomeasureoneli
terofwater?
Sol
uti
on
MAKEALI ST
Therei sacommonsay i
ng,"Don'
tjustst andthere,dosomet hi
ng!"Whensol vi
nga
problem,don'tjustthink,writesomething!Draw adi agr
am ormakeal ist!Iti
soften
obviouswheny oushoul ddraw adiagram.Andi tisoftenobvi
ouswheny oushould
makeal i
st.Takeav erysimpleexample:putti
ngt hi
ngsinorder
.
Thel ett
ersABCD, canbeputi nt
oadifferentorder:DCBAorBADC.Howmanydi f
fer
ent
combi nati
onsoft hel et
tersABCDcany oumake?Toanswert hisquest
ion,obvi
ously
,
youhav etomakeal ist.
SYSTEMATI
Cli
st.Forexampl
e:
BymakingaSYSTEMATI Cli
st,
youwi
l
lseeever
ypossi
blecombinati
on.(
Lat
er,
per
haps,
theywil
llear
nthatt
henumberofper
mutat
ionsofsi
ze4t akenfr
om asetof4canbe
repr
esentedbythef
ormul
a4*3*2*1=24) .
Exampl e2
Melikeand Fundaar egood fr
iends.WhenMel i
kegott heflu,herdoctorwr ot
ea
prescr
ipti
onf ortwenty30mgpill
s,andt ol
dhertot aket
woaday ,oneaft
erbreakfast
andoneaf t
erdi nner
.Threedayslater
,Fundaalsogott hefl
u.Herdoctorprescri
bed
thi
rty20mgpi l
l
s,andt ol
dhertotakeapi llev
eryfourhoursbetween9:00and21: 00.
Whosemedi ci
newasf ini
shedf
ir
st?
STRATEGY3:GUESSANDCHECK
Oftenwhenpr esentedwi thapr oblem,y ouar eencour agedt oguesst heanswer .For
exampl e,"What 'st
hel argestci t
yint hewor l
d?Takeaguess. "YouguessI stanbul."
No,
i
t'sToky o,"youar etold."Howmanypeopl elivei nToky o?Takeaguess. "Yousayy ou
don'tknow." Goon,t akeaguess, "y ou'ret oldagai n.Youguess15mi l
li
on." No,34
mill
ion!".Guessi ngof t
enpr oducest hewr onganswer .Butt hest rat
egycal led"Guess
andCheck"of t
enpr oducest her i
ghtanswer .becauset hepr ocessofchecki ngthe
accuracyofeachguessandt henmaki nganot her,morei nf ormedguessi sanessent ial
partoft hestrategy.
Forexampl e,hereisapr oblem:
Busr awentt ohergr andfather'sfarm.Hergr andfatherhaschi ckensandgoat sonhis
farm.She asked hi m how many chi ckens and how many goat s.Because her
grandfatherlikesmat hemat icalpuzzles,het oldhert hathi sani mal shad26headsand
68l egsandf rom thatinformat i
onshecoul dcal cul
atet henumberofchi ckensandt he
numberofgoat s.I
fyouwer eBusr a,howwoul dy ousol vet hepr oblem?
Touset heGuessandCheckst r
ategy ,
y out hinkaboutt hepr oblem andst artbymaki ng
aguess.Youexpecty ourfirstguesst obewr ong,buti twi llgivey ousomei nformati
on
tohel
py oumakeabet
terguessnextti
me.Youcouldstar
tbyguessi
ng13chi
ckensand
13goats.I
t'
sagoodi
deatokeepar ecor
dofyourguesses,l
i
kethi
s:
Youseet hatt
henumberoflegsyouguessedi
stoohi
gh,becauseBusr
a'sgrandf
ather
sai
dt hatther
ear
e68l egs.Soyouguessagain-
youhavetoaddmor echickensand
subt
ractsomegoats.
Nowy ouhav
e64l egsandyouneedfourmore.Butyoucan'
taddanymor
eheads,si
nce
26ist
hecorrectnumberofheads.Soyout
akeawayt wochi
ckens(t
woheadsandfour
l
egs)andaddtwogoats(twoheadsandeightl
egs).
Nowy
ouhav
ethecor
rectanswer
:18chi
ckensand8goat
s.
Exampl e2
El
izabethvisi
tsherfri
endAndrewandthenret
urnshomebyt hesamerout
e.Shealways
walks2ki l
omet er
sperhour(km/h)whenwalki
nguphil
l
,6km/ hwhenwalkingdownhi
ll
,
and3km/ hwhenwal ki
ngonlevelgr
ound.I
fhertot
alwalki
ngtimeis6hour
s,thenwhat
i
st hetotal
distanceshewal
ks( i
nkil
ometer
s)?
STRATEGY4:DI VIDEANDCONQUER
Ther eisaf olktaleaboutar i
chf ar
merwhohadsev ensons.Hewasaf raidthatwhenhe
died,hisl andandhi sanimal sandal lhispossessi onswoul dbedi videdamonghi s
sev ensons,andt hattheywoul dquar relwi t
honeanot herandt hatt heirinher it
ance
woul dbespl i
nteredandl ost.Sohegat her edthem toget herandshowedt hem sev en
sticksthathehadt i
edtogetherandt oldt hem thatany onewhocoul dbr eakt hebundl e
woul dinheriteverythi
ng.Theyal lt
ried,butnoonecoul dbr eakthebundl e.Thent heol d
manunt iedthebundl eandbr oket hest i
cksonebyone.Thebr ot
her slearnedt hatthey
shoul dstaytoget herandwor ktogetherandsucceedt oget her.
Themor alforpr oblem sol
versi sdiff
erent.Ifyoucan' tsol vethepr obl
em,di videi tinto
par t
s,andsol veonepar tatat i
me.
Anexcel lentappl i
cati
onoft hi
sst r
ategyi sthemagi csquar esproblem.I tiswel lknown.
Youhav easquar eformedfrom threecolumnsandt hr
eer owsofsmal l
ersquar es.
Par t1:DrawaDi agram
Part2:GuessandCheck
Beginbyenter
ingt
henumber
sinor
der
,justt
oseewhathappens:
1 2 3
4 5 6
7 8 9
Themi ddl
ecol
umnandt hemiddl
erowaddupto15andt hetwodiagonalsaddupto15.
I
thasbecomeobv ioust
hat5isagoodchoiceforthemiddl
e,butwehav etoadj
ustt
he
othersquar
es.
Part3:MakeaList
I
twoul dbehel
pful
nowtoidenti
fyal
lthecombi
nati
onsofthr
eedigi
tsthataddupto15.
Part4:GuessandCheckAgain
Nowwecanqui ckl
yseewhichcombinat
ionsofnumberswil
lsolvethepuzzl
e.Ther
ear
e
fourcombinati
onsthathav
et henumber5,andallfourcombinati
onsareneededwit
h
number5i nthemiddl
e.
4 3 8
2 7 6
4 3 8
9 5 1
2 7 6
Thus,
bydi
vi
dingt
hepr
obl
em i
nto4par
ts,
itcanbesol
vedsy
stemat
ical
l
y.
Exampl
e2
Mixtur
epr obl emsof tenappeari nmat hemat i
cst extbooks.Herei sanexampl eofa
mixtur
epr oblem.
Ami xtureis25%r edpaint,30%y ell
owpai nt,and45%wat er
.If4quart
sofr edpaintare
addedt o20quar tsoft hemi xture,whati st heper centageofredpainti nthenew
mixtur
e?
This problem i st aken from t he book Cr ossing the Riverwith Dogs and Ot her
Mathemat icalAdvent ur
es,byKenJohnsonandTedHer r,abookaboutproblem sol
ving
str
ategies:http://
www. keypress.
com .
Astudentsol v i
ngthisproblem hasdivi
dedi tintofourpar t
s:
Part1:Findt heamountofr edpaintintheoriginalmi xt
ure:
Par Fi
t2: ndt
het
otalamountofr
edpai
nt:
Par Fi
t3: ndt
het
otalamountoft
hewhol
emi
xtur
e:
Par Cal
t4: cul
atet
henewper
cent
age:
Apai rofrabbi t
s,onemal eandonef emale,areputintoapen.Af t
ertwomont hsthey
hav etwoof fspri
ng,onemal eandonef emal e.Theycontinuetohaveanaddi ti
onalt
wo
offspri
ngev erymont hther
eafter,al
waysapai r
,onemal eandonef emale.Thispatt
ern
continues:aftertwomont hs,everypairofr abbi
tsst
ar ttorepr
oduceandev er
ymont h
thereaft
ertheyhav eapairofoffspri
ng.Afteroneyear,howmanypai rswil
ltherebe?
Thesol uti
onpr oducesaseriesofnumber snowknownast heFi
bonacciseri
es.
I
fy ouseethepatternthatdev el
opsmont hbymont h,youcaneasilypredi
cthowmany
pair
stherewillbeafter12mont hs(144)andaf ter13mont hs(233).Eachsucceedi
ng
numberintheseriesi
st hesum oft heprev
ioust wonumber s.
Wheny ouseeapat terny oucanmakeapr edict
ion,andthatistheessenceoft he
probl
em sol
vingstrat
egy :
seet hepatter
n,makeapr edi
cti
on.
Hereisanexampleofapat ter
nandapr edict
ion:
ThePr
obl
em
Inthei
rbiol
ogyclass,AyseandMehmetl ear
nedhow t
ocountapopul
ati
onofy
east
cell
s.
Usingaspecialcounti
ngmicroscope,t
heycount
edthecel
l
sever
yhourandent
ered
thei
rdatai
nat abl
e.
Theirteachert
oldthem t
hatt
hepopul
ati
onwoul
dstopgr
owingandremainstabl
eat
about500cel l
s.Atwhatti
mewouldAyseandMehmetdi
scovert
hatthepopul
ati
onhad
stoppedgr owi
ng?
Thepat
ter
n
AyseandMehmetseeapat
ter
nint
hei
rdat
a.Thepopul
ati
ondoubl
es(
appr
oxi
mat
ely
)
ev
eryhour
.
Thepr
edi
cti
on
At13:00ther
ewillbe(approxi
mat el
y)150cells;
at14:00t
herewil
lbe( approxi
mately
)
300cell
.At15:00, i
ftheteacheriscorrect
,therewi
llbe(appr
oximately)500cell
s.They
wil
lknowt hepopulati
onhasst oppedgr owi
ngat16: 00i
ftherearestil
l(approxi
matel
y)
500cell
s.
STRATEGY6: STARTATTHEEND
Somet imesi nor dert oaccompl i
shsomet hi
ngy ouhav et ostartattheend.At hl
etessee
themsel veswi nni ngev enbef orethecompet i
tionbegi ns.I tiscaledv
l i
suali
zi
ngsuccess.
Engineersmakedr awi ngsoff i
nishedpr oductsev enbef oretheyknow how t obui l
d
them.
StephenCov eyinhi sf amousbook7Habi t
sofHi ghlyEf f
ecti
vePeoplesayst hathighl
y
effecti
vepeopl e“ st artwi t
ht heendi nmi nd.”InUnder standi
ngbyDesi gn,abookabout
teaching and l ear ning,Gr antWi gginsand JayMcTi ghe describe a method call
ed
“backwar dsdesi gn” :y oust artbyaski ngwhaty ouwi llasky ourstudentstodot oshow
thattheyunder st and...andt heny oupl ant ot eacht hem howt odoi t.Veryoft
en,the
roadt osuccessst ar tsatt heendandnotatt hebegi nni ng.
Soi tiswi thpr obl em sol vi
ng.Tosol v esomepr oblems,y oustartattheendandwor k
backwar ds.Howev er,t hedi recti
onsf orgoingbackwar dsarenotexact l
ythesameas
thedi r
ectionsf orgoi ngf orwar ds.I magi nel eavingt heschoolt ogot othePostOf fi
ce
andt henr eturningt ot heschool .
Tosol v et heMangoesPr oblem,st artwiththe3mangoesl ef
tint hebowlaf t
er
theKi ng,t heQueen,andt het hreePr i
nceshav ealleatentheirshare—andwor k
BACKWARDSf rom ther
e.
Thet hirdPr inceat e1/2ofthemangoeshef oundi nthebowlandl eft3.Sohe
musthav ef ound6mangoesi nt hebowl.
ThesecondPr inceate1/3oft hemangoest hathef oundinthebowlandl ef
t6.
Therefor e6=2/ 3ofthemangoeshef ound,and1/ 3=3.ThesecondPr i
nce
musthav ef ound9mangoesi nt hebowl.
They oungestPr inceat
e1/ 4oft hemangoeshef oundinthebowl ,leavi
ng3/ 4.
Therefor e
3/4=9, and1/ 4=3.They oungestPr i
ncemusthav efound12mangoes.
Thatmeanst heQueenl eft12. Si ncesheat e1/ 5,4/5=12and1/ 5=3.
Therefor et he
Queenf ound15mangoesi nthebowl .
Sincet heKi ngl eft15mangoesaf tereati
ng1/ 6,5/6=15and1/ 6=3.Ther ef
or e
therewer e18mangoesi nthebowl whentheKi ngfoundthem.
Youst artedatt heendandwor kedBACKWARDSt othebeginni
ng
Exampl e
Mr.andMr s.Atki
nshadf r
iendsf r
om Canadacomet ovisi
tthem.Theydeci ded
totaketheirfri
endst othei
rf avor
it
erestaur
antfordinner.Inaddit
iontothecost
oft hedinner,Mr .At kinshadt opaysomeext raexpenses. Hepai d$12f or
parking,
$18f ortax, andhel eftatipof$30forthewaiters.Whent heygothome,
Mrs.Aki nsaskedMr .Atkinshow mucht hedi nnerhadcost .“Well,
”hesai d,
l
ooki ngi
nhi swallet.“IknowIst art
edwith$300,andnowIhav e$15.”
Whatwi llhetel
lMr s.At ki
ns?Howmuchwast hedinner?
Sol
uti
on
ALGORI
THS(
FLOWCHARTANDPSEUDOCODE)
Inthe pr oblem-sol
vi
ng phase ofcomput erprogrammi ng,you willbe desi
gni
ng
al
gori
thms.Thi smeansthaty ouwi l
lhavetobeconsciousoft hestr
ategi
esyouuseto
sol
vepr oblemsinordert
oappl ythem t
oprogrammingpr oblems.Theseal
gori
thmscan
bedesignedt hr
oughtheuseoff l
owchartsorpseudocode.
Flowchart
Flowcharti
sat ooldevel
opedinthecomput eri
ndust
ry,f
orshowingthestepsinvol
ved
i
napr ocess.Af l
owcharti
sadi agram madeupofboxes,diamondsandot hershapes,
connectedbyarrowseachshaper epr
esentsast
epintheprocess,andthearr
owsshow
theorderinwhi
cht heyoccur
.Flowcharti
ngcombinessymbolsandf l
owl i
nes,t
oshow
fi
gurat
ivel
ytheoperati
onofanalgorit
hm.
Incomputing,t
herearedozensofdi f
ferentsymbol
susedi nf l
owcharti
ng(ther
ear e
evennati
onalandinter
nat
ionalf
lowchartingsymbolst
andards).Inbusinessprocess
anal
ysi
s,acoupleofsymbolsaresuffi
cient.Aboxwithtexti
nsidei ndi
cat
esast epin
thepr
ocess,whil
eadiamondwithtextrepresent
sadeci
sionpoint.Seethefi
gureforan
example.
Iftheflowcharti
st oomessyt odraw,trystart
ingagain,butl
eavi
ngoutalloft he
decisi
onpoi nt
sandconcentr
atingont hesimplestpossi
blecour
se.Thenthesession
cangobackandaddt hedeci
sionpointslat
er.I
tmayal sobeusef
ultostar
tbydrawing
ahi gh-
levelfl
owchartf
orthewhol eor gani
zati
on,witheachboxbei ngacompl ete
processthathastobefi
ll
edoutlater
.
From t
hiscommonunder standingcancomeanumberoft hings-processimpr
ovement
i
deaswi llof
ten ar
ise spontaneouslydur
ing a f
lowcharti
ng session.And aft
erthe
sessi
on,thef
acil
i
tatorcanalsodr awupawr i
ttenprocedure-aflowcharti
ngsessi
onis
agoodwayofdocument i
ngapr ocess.
Processimpr
ovementstar
tswithanunderst
andi
ngoft
hepr
ocess,andf
lowchar
ti
ngi
s
thefi
rstst
eptowar
dsprocessunder
standi
ng.
Progr
am Fl
owChartSymbol s
Therear
e6basi csy mbolscommonl yusedi nfl
owcharti
ngofassembl ylanguage
progr
ams:Ter
minal
,Process,i
nput/
output
,Decisi
on,Connect
orandPredef
inedProcess.
Thisi
snotacompleteli
stofallthepossi
blefl
owchartingsymbol
s;i
tistheonesused
mostoft
eninthest
ruct
ureofAssemblylanguageprogramming.
Gener
alRul esforf lowcharting
1.Al lboxesoft hef l
owchar tar econnect edwi thAr r
ows.(
Notl i
nes)
2.Fl owchar tsy mbol shav eanent rypoi ntont hetopoft hesymbolwi t
hnoot her
entrypoi nts.Theexitpoi ntf orallfl
owchar tsymbolsisont hebot t
om exceptfor
theDeci sionsy mbol.
3.TheDeci sionsy mbolhast woexitpoi nts;thesecanbeont hesidesort hebot
tom
andonesi de.
4.Gener all
yaf l
owchartwi llflowfrom topt obot t
om.Howev er
,anupwar df l
owcan
beshownasl ongasi tdoesnotexceed3sy mbols.
5.Connect or sareusedt oconnectbr eaksi nt heflowchar
t.Exampl esare:
6.Fr om onepaget oanot herpage.
7.Fr om t hebot tom ofthepaget othet opoft hesamepage.
8.Anupwar dflowofmor et hen3sy mbol s
9.Subrouti
nesandInter
ruptprogramshav et
heirownandindependentf
lowchar
ts.
10.
Allflow chart
s star
twi th a TerminalorPr edefi
ned Pr
ocess (f
orinter
rupt
programsorsubrouti
nes)symbol.
11.
Allf
lowchart
sendwi t
hat erminaloracontent
iousloop.
Fl
owchar tusessy mbolsthathav ebeeninusef oranumberofy earstor epresentthe
ty
pe ofoper ati
ons and/orpr ocesses being perfor
med.The st andardized format
prov
idesacommonmet hodf orpeopletov isuali
zeprobl
emst ogetheri nthesame
manner.Theuseofst andar
dizedsy mbolsmakest hefl
ow char
tseasi ert ointer
pret
;
however,standardi
zingsymbolsi snotasi mpor t
antasthesequenceofact iv
iti
esthat
makeupt heprocess.
Thefoll
owi
ngsecti
ondealwit
ht hecont
rolst
ruct
ures(
cont
rolconst
ruct
s)Sequence,
Sel
ecti
onandI
ter
ati
onorRepet
iti
on
ThreeProgram Constr
uctsi
nPr ogram Fl
owChart
Sequence
Asequenceexecut i
onofpr ocesses.Eachinst
ruct
ioni
sexecut
edi
naser
ialmanner
,
oneafteranot
her.
E.g.
DO
S1:GETnumber 1
S2:GETnumber 2
S3:answer=number 1/number2
S4:DISPLAYanswer
ENDDO
Theabov
esequencemustbef
oll
owedi
nor
dert
opr
intoutt
heanswer
.Yougett
wo
number s,computethe answerwhi ch i
sthe divi
sion ofnumber
1 overnumber2.
Eventuall
y,af
tert
hecomputat
ion,t
heansweri
sprint
edout .
IfthesequenceofS2andS3i srever
sed,t
her
ewillbeaner r
orast
herei
snoinputdata
storedinnumber2.
Selecti
on
Provideadeci
si
onpoi
ntt
hatall
owsoneoftwochoi cest
obechosen
E.
g.1
DO
GETnumber1
GETnumber2
I
Fnumber2=0THEN
DI
SPLAY"Di
v i
sionbyzer
oer
ror"
ELSE
DO
answer=number1/number2
DISPLAYanswer
ENDDO
ENDDO
Thedeci
sionpoi
ntorcondi
ti
onabov
eiswhethernumber
2isazer
o.I
fcondi
ti
onistr
ue,
i
.e.number2i
sazerothenthemessageof"
Divi
sionbyzer
oer
ror
"wi
llbedi
splay
ed.If
condit
ionisfal
se,i
.e.number 2isnotazer o,t hencomput at
ionofnumber
1di v
ideby
number 2i
scarr
iedout.Ther esultofansweri sthendi spl
ayed.
Therewill
notbeacasewher ebyy ouwillseebot htheer r
ormessageandtheanswerbe
di
splayedatt
hesamet i
me.
E.g.2
DISPLAYmai nmenu
GETchoi ce
DOCASE
choice1
DISPLAY( "Choice1sel ected")
choice2
DISPLAY( "Choice2sel ected")
choice3
DISPLAY( "Choice3sel ected")
choice4
DISPLAY( "Choice4sel ected"
)
ENDCASE
I
nt he abov
e diagr
am,multi
ple decisi
on poi
nts orcondi
ti
ons ar
e est
abli
shed to
determi
newhetherchoi
cevar
iablehasav al
ueof1or2or3or4.Ifcondi
ti
onistrue,
the
respect
ivemessagewil
lbedi
splayed.
I
ter
ati
on
Repeatasetofi nstr
uct i
onsanumberoft imesbasedonconditionst at
ed.Thisl
oopwil
l
endwhencondi tionhasbeenf ulf
il
led.
E.g.1
DO
total =0
GETnumber
WHI LEnumber<1000
DO
total=t otal+number
GETnumber
ENDDO
DI SPLAYt otal
ENDDO
Theconditionst atediswhet hernumber<1000.I fcondi
tionistrue,i.
e.numberisl
ess
than1000,t hennumberi saccumul atedasthet ot
al. Aft
erwhi ch,yougetanot
her
number . Thenextexecut ionisgoi ngbacktot hewhilecondi tiontocheckifthe
condit
ionist r
ue,i fyes,y ouaccumul atet
hecurr
entnumberwi tht heprevi
ousnumbers
andgetanot hernumber .
The loop orsetofi nst r
ucti
ons wi l
lend when numberi s >= 1000,wher ebythe
accumulatedt otalwillbedi spl
ayed.
E.
g.2
FORi=1TO12
DO
r
esul
t=i*9
DI
SPLAY(
i,"
*9=",
resul
t)
ENDDO
Av ari
ableiisi
nit
iali
zedto1andevent
ual
l
ybei ncr
ementedby1.Ifii
sinbetween1to
12 inclusi
ve,a processi
ng ofiwil
lbe per
formed and t
he r
esul
tdispl
ayed. The
fol
l
owi ngsaretheexpectedout
put
:
1*9=9
2*9=18
3*9=27
4*9=36
5*9=45
6*9=54
7*9=63
8*9=72
9*9=81
10*9=90
11*9=99
12*9=108
Connect ors
Wheny ouhav eapr ogr
am wheret helogiccannotberepresent
edinaf lowchar tt
han
canf i
tononepage,y ouuseconnect or
st oconnectt
heflowchartsondifferentpages.
Howev er,theuseofconnect or
sshoul dbeav oi
dedifpossibl
east hel ogicofthe
program ismor edi
ffi
cul
ttofol
lowwhent heydonotfi
tonapage.
Forinstance,ifafl
owcharthassixprocessingst
epsandapagecanf i
tonlyt hr
eesteps,
theconnect orcomeintouse.
Onpage1,thenumberassi
gnedint
heconnectormat
chesupthenumberassi
gnedi
n
t
heconnect
oronpage2todeter
minethenextst
epi
nthefl
owchar
t.
Poi
ntstoRemember
Thet hreebasicconstructs-sequence,
selecti
on,it
erat
ion.
Sel ectionsarerepresentedbydi amondshapewi thfl
ow br anchesof"yes"and
"no"inpr ogr
am fl
owchar t
.
I ter
ationsarerepresentedbydiamondshapewi t
hflowbr anchesof"y
es"and"no"
and al ways goi
ng back t o previ
ous i
nstruct
ion tof orm al oop i
n progr
am
fl
owchar
t.
Connect
orsar
eusedt
oconnectf
lowchar
tst
hatcannotf
iti
ntoonepage
PSEUDOCODE
Pseudocode,bynat ur
e,exi st
si nv ar
iousforms,althoughmostbor row synt
axf r
om
popul
ar0progr ammi nglanguages( li
keC,Lisp,orFORTRAN) .Naturallanguageisused
wheneverdetailsareunimpor t
antordist r
act
ing.
Computersci ence text
books of ten use pseudocode int hei
rexampl es so t
hatall
progr
ammer scanunder standthem, evenift
heydonotal lknowt hesamepr ogr
ammi ng
l
anguages.Sincepseudocodest ylev ari
esfrom aut
hort oaut hor,thereisusuall
yan
accompanyingi nt
roductionexplai
ningt hesy
ntaxused.
I
nt healgori
thm desi
gn,thestepsoftheal
gori
thm ar
ewri
tt
eninfreeEngl
isht
extand,
al
thoughbr evi
tyisdesi
red,theymaybeasl ongasneededtodescri
bethepart
icul
ar
operat
ion.Thestepsofanalgori
thm ar
esai
dtobewr i
tt
eni
npseudocode.
RulesforPseudocode
Justasinflowchar
ts,
therear
erul
estobefollowedwhenusi ngpseudocode.Howev
er,
manyv ersi
onsofpseudocodeexi
st,
andthereisnoindustryst
andard.Therul
es
descri
bedbelowareadheredtobymostorganisat
ionsthatusepseudocode.
Thepseudocodemustbelanguageindependent.Tr
ytoavoi
dtheuseofwor
ds
pecul
i
artoanyprogr
ammi nglanguage.
I
ndentli
nestomakethepseudocodeeasyt oreadandunder
stand.
Showkeywor dsi
nCAPITALLETTERS
Example:
IFcondit
ionTHEN
DOact i
on
ENDDO
ENDIF
Punct uati
onisopt
ional.
EveryI Fmustendwi t
hanENDI F.
EveryDO, DOFORandDOWHI LEmustendwit
hENDDO.
Themai nrout
ine(
theonethatgoesf
rom STARTt
oSTOP)hast
obeshownf
ir
st.
Allotherrouti
nesaretofol
l
ow.
Adv
ant
agesi nUsi ngPseudocode
Itbri
dgest hegapbet weenhumanl anguageandcomput erlanguage.
Iti
sani ntermediatenotat
ionthatal
lowsexpressi
onofpr ogram l
ogicina
strai
ghtforward,easytounderstandmannerwi t
houtconcerningtheprogr
ammer
withsyntaxdetails.
Iti
seasiert omakechangest opseudocodethant oasour ceprogram i
nahigh-
l
ev ell
anguage.
Itall
owsf orstr
uct ur
edwalk-t
hroughs.
Manyl
anguages,suchasPascal
,hav
easy
ntaxt
hati
sal
mosti
dent
icalt
opseudocode
andhencemaket
het
ransi
ti
onf
rom desi
gnt
ocodi
ngext
remel
yeasy
.
Fl
owchar
tRepr
esent
ati
on
Fl
owchar
tsequence
DO
Modul
e-A
Modul
e-B
Modul
e-C
IFCondi
ti
on-ATHEN
ENDDO DO
Modul
e-B
ENDDO
ENDIF
Fl
owchar
tsel
ect
ion(
singl
e)
I
Fconditi
on-
ATHEN
DO
Modul
e-B
ENDDO
ELSE
DO
Modul
e-C
ENDDO
ENDIF
Fl
owchar
tsel
ect
ion(
IF…ELSE)
I
FCondition-ATHEN
DO
Module-E
ENDDO
ELSE
IFConditi
on-BTHEN
DO
Module-F
ENDDO
ELSE
I
FCondi t
ion-C
DO
Module-G
ENDDO
ELSE
IFConditi
on-D
DO
Module-H
ENDDO
ENDIF
ENDIF
ENDIF
ENDIF
Fl
owchar
tsel
ect
ion(
mul
ti
ple)
Not
e:Fr
om t
he‘
nest
ed’
str
uct
ureabov
e,ev
ent
ual
l
yonl
yonemodul
ewi
l
lbeexecut
ed
outofal
lout
comeav
ail
abl
e.
Fl
owchar
tit
erat
ion(
DO…WHI
LE
DOWHI LE
Condi
ti
on-A REPEATUNTILCondi
ti
on-
A
Modul
e-B Module-
B
ENDDO ENDREPEAT
Fl
owchar
tit
erat
ion(
REPEAT…UNTI
L)
Poi
ntst
oRemember
Commonpseudocodet er
ms:
DO. .
.ENDDO(toenclosearout
ine)
IF.
..THEN..
.ENDIF
IF.
..THEN..
.ELSE...ENDIF
WHILE..
.DO. .
.ENDDO
REPEAT...UNTIL
Representat
ionofpseudocodeinf
lowchar
t.
Advantagesofusingpseudocode.
SYSTEM LI
FECYCLE
Obj
ect
ives
Att
hecomplet
ionofthi
schapter
,youwouldhavel
ear
nt:
Theconceptofasystem;
Thevari
ousstagesofasystem l
i
fecycl
e;
Toident
ifyt
heactiv
iti
esandpeoplei
nvol
vedi
neachst
age.
Int
roduct i
on
Asy stem isacol lecti
onofr el
atedcomponent sthatserveacommonpur pose.Inthe
phrase“ Syst
em Li feCy cl
e”,asy stem iseitheraprogram oracol lect
ionofpr ograms.
Therefore,asystem l i
fecycl edescribeshowpr ogramsar edevelopedf rom anidea,to
compl etedprogramsandt hen, t
or evisedordisconti
nuedprograms.I nthischapter,we
shallstudytheei ghtphasesi nt hel i
fecycleofasy stem.Al ogicalappr oachwillbe
empl oyedtodescr ibethest ages,starti
ngfrom whenani deaisconcei ved,tothestage
whent hecompl etedsy stem isreviewed.
WhatisaSy stem?
Wehav ebeenusingthewor d“
sy stem”qui tef
reel
y,butbefor
ewediscussallthest
ages
ofasy st
em li
fecycl
eandt hepartt hataprogrammerpl ay
s,weneedtobecl earwhata
syst
em is.Manydef i
nit
ionsexist,andwecanal sof i
ndsatisf
act
orydefi
niti
onsinthe
publ
icati
onsofvari
ousstandardinst i
tut
ions.
StagesofaSy st
em Li f
eCy cle
Theenv ir
onmenti nwhi chanysy stem f unctioneddoesnotr emai nstat i
cf orv erylong.
Becauseoft hi
s,thesy st em hast ochange.Whent herearechanges,t hesy stem wi l
l
eventuall
yneedt ober epl aced,orsi gnif i
cantlyalt
eredtobecomeanew sy stem ora
new v er
sion.Iti
sappr opr i
ate,therefore,t oregardt hedevelopmentofasy stem asa
cycl
icalprocess,rathert hanonewhi chhasadef i
nit
eendpoi nt.Thei terat
ivenat ureof
system developmentmaymakei tnecessar yt orepeatanyst ageunt ilitisaccept abl e.
Thepr ocessofreplacingt heol dsystem wi t
ht henew, happensinaser iesofst agesand
thewhol eprocessiscal ledt he“system l if
ecy cle”
.Thesy stem lif
ecy clecanbedi vided
i
ntoei ghtphases,asshowni nFigure1- 1.Althougheachphasei spresent eddi scretely,
i
tisnev eraccompl i
shedasasepar at
est ep.
El
ementsoftheSy stem Li
feCy
cle
I
neachstage,di
fferentdocument
sar erequi
redasinput
,di
ff
erentact
ivi
ti
est
akepl
ace
wi
thdi
ff
erentpeoplei nv
olv
edanddif
ferentdocument
saregenerat
ed.
Ini
ti
alStudy
Asy stem pr
ojectwi l
lnotst ar
tfornoappar entreasons.Itmusthavebeeni nit
iat
edby
someone( wewi llgener
allycallhi
mt heuser).Basedont heuser’
srequests,
theSy st
em
Analyst(SA)willcheckthebackgr oundoft heproblemst oseeifiti
spossibletosolve
them.Af t
erthest udy,t
heSAwi l
lproduceaf easi
bili
tyrepor
t.Thi
sreportwilldescr
ibe
thescopeoft henew sy stem andcont ai
nsest i
mat esofthetime,costsandbenef i
ts
thatwouldresultfrom t
hesy stem.
Detail
edwor kwillonl
ycommencei ft
heprojectisapproved.
System AnalysisandDesi gn
Basedont hef easi
bili
tyrepor
t,theSAwi l
lcarr
youtar equir
ementanal ysis.TheSAwil
l
usetechniqueslikeinter
viewi
ng, observ
ation,
questionnairesand/ orr
eadingofmanuals
tofi
ndoutf rom theusert henewsy stem’srequir
ement s.Whatt heSAhasgat heredwi
l
l
bedocument edusingt oolslikeDat aFlow Diagramsand/ orRunChar ts.Therewi
l
l
normall
ybeapr esentati
onbytheSAt otheusertov eri
fythefindings.
Oncethefindingshav ebeenconf i
rmedtobeaccurat
e,t
heSAwi l
ldesi
gnasy st
em that
wil
lmeettheuser ’
sr equi r
ements.TheSAwi l
lproducethesy
stem speci
fi
cat
ion,which
i
ncludes:
Thei nformationf low
Thef il
est or
ageor ganizat
ion
Thepr ogram’sr equir
ement s
Theout l
i
neoft heuser ’
soperati
onsmanual
Anaccept
anceoft hesy
stem speci
fi
cat
ionbytheuserwi
l
lmar
ktheendoft
hisst
age
andt
heauthor
izat
iontocommencewi t
hthenext.
Program Design
Basedont hesy stem speci f
icati
on,theSAort heSeniorProgrammerwil
lthenproduce
theprogram speci ficat
ionforeachoft heprograms( i
fther
ei smor
ethanoneprogram).
TheSAort heSeni orProgrammerwi l
lhavet oensurethatallpr
ogr
am specif
icati
ons
adheretot hesy stem speci f
icati
onandst andards.Theywillal
sohav
etoensuret hata
testscheduleispr eparedf oreachprogram.
Typical
ly,t
hepr ogr am specifi
cationconsi
stsof:
Pr ogram/ modul edescr ipt
ionandobjecti
ves
Inputf i
le(s)speci f
icati
on
Outputfi
l
e(s)speci
fi
cat
ion
Processi
ngrequir
ement
Thepr ogrammerwillt
akethepr ogram speci
fi
cati
onanduseamethodagreedupont o
design the pr
ogram before coding i
t.Common met hods ar
e Jackson St
ruct
ured
Programmi ng,Pseudocode,Flowchar t
,St r
uctur
ed Char
tand NassiShnei der
man
di
agr ams.
Devel
opment
Whenthedesi gni scompleted,thedev el
opmentst
agebegins,whi
chi
stoconv
ertt
he
desi
gnintowor kablesol
uti
ons( programs).
Thedevel
opmentst agecanbedi videdint
otwomainact
ivi
ti
es:
Fil
ecreat i
on
Appli
cationpr ogr
am creati
on
Detai
l
eddocument ati
onont hefi
lesandpr
ogr
am usedi
nthesy
stem ar
eal
sodoneat
t
hisstage.Theseinclude:
I nputandout putspeci
fi
cat
ions
Dat adicti
onar y
Oper ati
nginst r
ucti
on
Testing
Throughoutthedevelopment,andasaseparat
estageafterdevel
opmentiscomplet
ed,
testi
nganddebuggi ngwi l
lbenecessary
.Test swil
lbecar r
iedoutaccordi
ngtot he
schedulepreparedbyt heSA orSeniorProgrammer.Duringtheprocessoftesti
ng,
changescanbemadei nanyoft hepr
evi
ousstages(ref
ertoFigure1-
2)torect
if
yany
error
sorproblemsdiscovered.
Atthi
sst age,
thedocumentsgener
atedar
e:
Testl
og
Testplan
Testdata
Testresult
s(bot
hexpectedandactual
)
Implement ation
Afteradequat et esting,implementati
onoft hesystem takesplace.Thestageincludes
theinst
allati
onoft hehar dwarebeforethesystem i
shandedov ertotheuser.I
tcov er
s:
Usert rai
ning
Dat aconv ersion
Cont r
ol procedur esforthechangeover
TheSy stem Anal ystwi llberesponsibl
eforthei mplementat
ionpl anwhichcov ersin
detailt
het i
mef ramef oreachoft heactivi
ti
esment ionedabov e,andthedutiesand
responsi
bi l
it
iesofeachoft hepersonneli
nvolv
ed.
The4i mpl ement ationmet hods:
Di r
ectchangeov er
Par allelchangeov er
Pi l
otchangeov er
Phased/ Gr adual changeover
Liv
eRunni ngandMai ntenance
Thisi st hest agewher ethesy stem becomesf unctionalinal i
veenv ironment,andis
expect edt obeabl etocopewi thanyoft hesituationsi tisbuilttohandl e.Liv
eusage
giv
esr iset omai ntenancerequest s.Error
smaybedet ectedwhi chmi ghthavesl i
pped
thr
ought het estingst age.Theremaybechangesi nt heuserr equirement sordiscover
y
of r equirement s whi ch hav e not been i ncluded i nt he f i
rst place due t oa
misunder standi ngbet weent heuserandt heSyst em Anal yst.Somet imesi tmaybedue
toext ernali nfluencesl i
kechangesi ngovernmentpol i
cieswhi chr equi
remodi fi
cati
ons
tothepr ogram ( e.g.GST).
Asl ongast her ei ssomeal ter
ation,alldocument ati
onr el
atedt ot hechangemustbe
updat ed.
Revi
ew
Oncethe“dust
”hasset
tl
ed,i
.e.t
hesy
stem hasbeenusedforasuf
fi
cientl
engthofti
me
andemergenci
eshavebeencopedwi
th,aneval
uati
onrev
iewshoul
dbecar r
iedout.The
rev
iewshoul dbecar ri
edoutbyaper sonwhohasnotbeeni nvolvedinthedesignand
developmentst agessoast oensurethattherevi
ewwillbecar
riedoutobject
ively
.The
contentoft her evi
ewwi l
li
nclude:
Obj ectivesmet
Cost
Per f
ormance
St andar ds
Recommendat ions
Aft
ert her eview,mai ntenancemaybecar r
iedouttoenhancethesy st
em oritmaybe
decidedt hatpar tort hewhol eofthesy st
em needstober e-
designed,andhencer e-
developed.I fredesigningneedst obedone,t heini
ti
alstudywillcomei nagain,thus
cal
li
ngi ntopl aytheent i
reSystem Li
feCycleoncemore.
Poi
ntst
oRemember
Theconceptofasy st
em.
Thevar
iousst agesofthesystem li
fecy
cle.
Theacti
vi
tiesateachst age.
Thepeopleinvolvedateachstage.
Documentationusedineachst age.
DESCRI
PTI
ONOFDATA
Obj
ect
ives
Att
hecompleti
onofthischapt
er,y
ouwouldhav
elear
nt:
thedif
ferentt
ypesofdata;
thedif
ferentt
ypesofdatastr
uct
ures.
DESCRI PTIONOFDATA
Introduct i
on
Themai nfuncti
onofacomput erprogram i
st opr ocessdat a.Thati s,t
oacceptdat a
from theuserasi nput,processthedat aandpresentt otheuserasout put
.Forexampl e,
asetofcust omer ’
sorderdet ail
sar eenter
edint
ot hepr ogram asinput.Afterprocessing,
anout puti nareceipt’
sf ormatwi l
lbeproducedbyt hepr ogram.
So,what evertasksacomput erprogram i
ssupposedt odo,itrequi r
esdat a.Therefore,
todev elopapr ogram liket heabov eexampl e,onewi l
lneedt oknow notonl yt he
structureoft heprogram logic,butalsothetypeofdat astructur
eneeded.I nt hi
slesson,
wewi l
l bediscussingthet ypesoffundamentaldataanddat astructures.
TypesofDat a
Therearetwofundament
alt
ypesofdat
a:Numer i
candNon- numeri
c.
Numer i
c
Number susedforsumsofmoney,
ages,di
stances.Forexample0.
33,0.1,0.
5,2,50.
01,
-
100, et
c.
Non-numeric
•Nonnumber ssuchasst r
ingsofcharacter
s.Forexampl e‘John’
,‘AS1234G’and
‘
2@* *556’
,etc.
Numer
ic
Di
vi
dedint
otwomai
ngr
oups:
Int
egerandReal
I
nteger
Wholenumber susedt ocountthi
ngs,exampl
e1,2,3,
..
.
Countdiscret
eobjectssuchasnumberofbananas,orangeorpenci
ls.
Preci
sev al
ues.Forexample,t
hev al
ue15,meansexactl
y15.
The range ofi ntegers pr
ovided i
n a computersy stem depends on t
he
hardware/l
anguageused.
Real
Mayhaveafr
acti
onalpar
t,exampl
e1.
0,234.
66,.
..
Canbeposi
ti
veornegati
ve.
Tomeasurethi
ngsli
kethelengt
hofapieceofstr
ing,ort
hecostofan i
tem i
n
doll
arsandcent s.
General
lyNOTapr eci
sev al
ue.
Nearestvalueisaccordi
ngt ot hemethodofstor
ageandtypeofari
thmeti
cused
(e.
g.forroundingoffmet hod,14.385inthi
scasewil
lbecome14.39and14.382
wil
lbecome14. 38whereasf ortr
uncat
iontotwodeci
malplacesbot
h14.385and
14.382willbecome14.38) .
Non-
Numer ic
Char acterstr
ings
Char acterstr
ingsmayconsi stofNumber s,Al
phabetsorAl phanumerics.
Tor epresentsuchchar act erstrings,quotes( ’)ar
eneeded.Forexampl ethe
nameJAMESwi l
lneedt obequot edas‘ JAMES’.
St r
ingchar actersarest or edascodesusi ngt heAmer i
canSt andardCodef or
Inf
ormat i
onI nter
change( ASCI I
)orExt endedBi nar
yCodedDeci malInter
change
Code( EBCDIC)codesy stem.
St r
ingoper at
ionusual l
yinv olvescompar i
son,concatenat
ionorselectiontoal
low
combinationsofst r
ings.Thusst ringsshouldhav edi f
ferentvaluesalso.For
exampl e,
‘A’<‘Z’,
‘ABC’ >‘AAA’
‘Alpha’<‘Alphabet’and
lowercasechar acters>Uppercasecharact
ers
Logical/Booleandat
a
Consist
sof2v alues:TrueorFal se.
Pointer
s,whichstor
et headdr essofv ari
abl
es.
Dates,whichall
owarithmet i
coper at
iononcalendardates.
Identi
fi
ers
Alldatait
emsusedi naprogr
am needtobedecl aredbef oreusage.Thismeanstost ate
downt henamegi v
ent oeachdatait
em storagecel lknownas“ i
denti
fi
er”
.Wewi l
lrefer
totheseidenti
fi
ersforthei
rcont
ent/v
alue.
Ani denti
fi
ermaybenumer i
cornon-numer ic.
Thedat atypet hatcanbecont ainedi nt hest oragecellwilldependont he
decl
arati
onoft hecel
l.
Thesest oragecelscanbeaconst
l antstoragecel lorvar
iablest
oragecel
l.
Const
ants
Itisa“ Read-
onl
y”vari
abl
ewhi chcont ai
nsf
ixeddat
aval
uest
hatcannotbe
changedduri
ngthepr
ogram execut
ion.
Var
iabl
es
Thei rcontentchangesaccor
dingt
otheuser
sinputort
hepr
ocessi
ngoft
he
program dur
ingexecut
ion.
Ty
pesofDat
aSt
ruct
ure
Dataitemsgroupedlogicall
ytoget
hert
ogivei
nformati
onaboutanindi
vi
dual
.
Forexampl e,an addressbooki sa dat
a st
ructur
econtai
ning dat
aitems(
names,
addresses,
phonenumber setc.
).
Ar
ray
sandTabl es
Anar rayi
sasequenceofconsecut i
vestoragelocati
onshav ingacommonname.
Ref ertothecontentsoft hest oragecell
sofeachar rayelementbya“ subscri
pt”
or“ i
ndex”whichisenclosedwi thasquarebr acket
,e.g.[1]
,[5,3]or[
counter]
.
Gr oupingofv ar
iablesinanar rayofsev er
al el
ements.
Forexampl e,aone- di
mensi onalar r
aythatstored6testmar ksofast udent.Thi
s
arrayiscall
ed‘StudentFi
le’.
St udentFil
e
Thev al
uei neachoft heboxst or
esat estmark.
Ref ertothecont entsoft hestor agecel
lofeachar rayelementbya“ subscri
pt”or
“i
ndex”.Forexampl e,t orefert othetestmar ki nboxnumber3,whaty ouwi l
l
needt odoi stocal lthearraybyi t
sname,f oll
owedbyt he“subscri
pt”or“index”
shownbel ow it.Inthiscase,y oucanr ef
ert othecont entsofboxnumber3by
call
ing“StudentFil
e[3]
” .
Aonedi mensi onalarraycanonl yholdast udent’
stestmar ksinthiscase,soi fa
datast r
ucturethati ssupposedt obecr eatedtost oreallthetestmar ksofa
classofstudents,at wodi mensi onalar
raymustbeused.
At wodi mensionalarr ayisat ablethatcanst oremor einfor
mat i
on.Anexampl e
i
sshownont henextpage.
At wo-di
mensi onalarraythatst ores6test
smar ksof3st udents.
StudentFil
e
I
nt hi
scase,youcanr
efert
othecont
entoft
het
hir
dboxi
nthef
ir
str
ow bycal
l
ing
“
Student
Fil
e[1,
3]”
.
Str
uctur
edDiagrams
Toshowt hegroupi
ngandrelat
ionshi
pofdat
ait
emsi
nar
ealcasei
npi
ctor
ialf
orm,
we
canusedatastruct
uredi
agr
ams.
Character
ist
icsofaStr
uctur
edDi
agr
am
Showshow t osub-
div
ideadatait
em i
ntoi
tspar
tsusi
ngt
het
hreedat
ast
ruct
ure
constr
ucts.
Thr
eeDataSt
ructur
eConstr
ucts
Si
mpleel
ementssuchasaddresscanber
epr
esent
edwi
thar
ect
angl
ebox.
Si
mplewi thlowerl
evel-Toshow it
scont
ent
smoreclear
ly,i
tissub-
div
idedi
nto
di
ff
erentpart
sshownatthel
owerl
evel
int
hef
oll
owi
ngdi
agr
ams.
Theabovediagr
am showsthattheelement‘ADDRESS’i
smadeupoft
heHouse
Number
,Str
eetNameandPostal
Codeinsequence.
Not
e:I
foneel
ementconnect
edupwar
dsi
sasel
ect
ion,al
lel
ement
sconnect
edupt
o
t
hesamepoi
ntmustbesel
ect
ions.
Onlyonesel
ect
ionwi
l
lbemader
egar
dlessoft
henumberofchoi
ces.
Example:
Dat
aSt
ruct
ureonanAddr
essBook
St
ati
cvsDy namicDat
aStructur
e
“STATIC”data st
ructure -t
he si
ze ofthe dat
a st
ructur
e needed t
o st
ore
i
nfor
mationCANNOTchangeastheprogram r
uns.E.
g.arr
ay.
“DYNAMIC”dat astructure-t hesi zeofthedat ast r
uct ureneeded t
o stor
e
i
nformati
onCANchangeast heprogram r
uns.E.g.li
nkedlist.
Eachmemberoft helistessenti
all
yformsar ecor
dinthelist.
Eachmemberr ecor
di sl i
nkedtot heNEXTLOGI CALRECORDbymeansofa
speci
alfi
eldwithi
ntherecordcalledaPOINTER.
ThePOINTERf i
eldcontainstheaddressofthenextlogi
cal recor
dinthel
ist.
Not
e:Notall
languageshavelinkedli
sts.
Eachrecordl
inkst
otheonebef
oreandt
heoneaf
ter
.
Typesofli
nkedli
stsar
e
Binar
ytree
Ri
ng
Fil
es,RecordsandFields
Fil
e
Afil
eisdefinedasagr oupofrelat
eddatar ecor
dshandledasalogi
calunit
.
Forexampl e,thestockmast erf i
l
econt ainsdat
ar ecordsofallstockitemsinthe
warehouse;thepayrol
lmast erfi
lecont
ainsdat ar
ecordsofallemployeescurr
ent
lyon
thepayrol
loftheorganizat
ion.
Recor
d
Ar ecor
disdef i
nedasagr oupofr el
ateddataitemscall
edf
iel
ds,for
minga
logi
caluni
t.
Forexample,t
hest ockmasterrecordmaycont ai
ndatait
emsli
keITEM-CODE,
DESCRIPTION,UNIT-PRI
CE,QUANTI TY-ON-HANDandsoon.Thesedat ait
ems
makeupt hestockmasterr
ecord,andtheyarecall
edFI
ELDS.
Fi
eld
Af
iel
disadat
ait
em f
ormi
ngasubdi
vi
sionofar
ecor
d.
Recordkey
•Def i
nit
ion
Ar ecordkeyisdefi
nedasaf i
eldwithi
nar ecordthatisusedast hebasi
sforor der
ing
therecordsinasequent
ialfi
leandalsoasameansofdi rectaccess.
•Exampl es
STOCKMASTERFi l
earrangedinascendingor derofit
em codewhi chi
sther ecordkey
thatmustbeunique.
SUPPLI ERMASTERFi el
darrangedinorderofv endornumber,whichist
herecordkey.
Poi
ntst
oRemember
Thedifferentt
ypesofdataandthei
r sexamples.
Ident
if
ierscanbeconstantorvari
able
Notati
onsusedi nDataStruct
ureDiagram
Concept sofstat
icanddynamicdatast r
uct
ureandt
hei
rsexampl
es.
I
NTRODUCTI
ONTOI
NTERNET
OBJECTI
VES
Att
hecomplet
ionofthislesson,youwouldhav elear
nt:
:
expl
ainvari
ousterminologyusedini nter
net
usevari
ousservicesprovidedbyinternet
sear
chthedesiredinformationoverinter
net
defi
nee-mailanditsvari
ousf eat
ures
expl
aintheprocessofdownl oadi
ngf il
e.
I
NTRODUCTI
ON
Inthepr esentage,useofI nter
neti
sbecomi ngqui t
epopularf
oraccessingi
nfor
mation
onanyt opicofyouri nterest.Ital
sopr ovi
dest remendousopport
uniti
estostudents,
researchersandpr ofessionalsforget
tinginformationonmat t
ersr
elatedtoacademic
andpr ofessi
onaltopicsandl otmore.I
nt hepresentwor l
d,mostoft
hepeoplewhohav e
comput ersaroundt hemsel vesuseInt
ernettoaccessi nfor
mati
onfrom theWorl
dWi de
Web, exchangemessages&document sande- ser
v i
ces.
I
NTERNET
TheI nterneti sagl obalsy stem ofinterconnectedcomput ernet workst hatuset he
standar dI nternetprotocolsuite(TCP/IP)toser vebill
i
onsofuser sworldwi de.Itisa
networ kofnet worksthatconsi st
sofmi l
li
onsofpr iv
ate,publi
c,academic,business, and
gov ernmentnet wor
ks,ofl ocalt oglobalscope,t hatarel i
nkedbyabr oadar r
ayof
electronic,wi rel
essandopt icalnetworki
ngt echnologi
es.TheI nt
ernetcar ri
esav ast
range ofi nformati
on r esources and ser v
ices,such as t he inter
li
nked hy pertext
document soft heWor ldWideWeb( WWW)andt heinfr
astructur
et osuppor telectr
oni c
mai l.
UsesofI
nter
net
Inter
nethasbeent hemostusef ultechnologyoft hemoder ntimeswhi chhel psusnot
onlyinourdai l
ylives,butal soourper sonalandpr of essionalliv
esdev elopment s.The
i
nt er
nethelpsusachi evet hisinseveraldiff
erentway s.
Fort he students and educat i
onalpur poses the int ernetis wi del
yused t o gat her
i
nf or
mat ionsoast odot her esear
choraddt ot heknowl edgeofv ar i
oussubjects.Ev en
thebusi nessprofessionalsandt hepr ofessi
onalslikedoct ors,accesst heinternett o
fil
terthenecessar yi nformat i
onf ort heiruse.Thei nternetist heref
oret hel argest
encyclopediaforev eryone,i nallagecat egories.Thei nternethasser vedt obemor e
usefulinmaintai
ningcont actswithfri
endsandr el
ati
v eswhol iveabroadper manent l
y.
Adv
ant
agesofI
nter
net
:
E-
mai l
:Emaili
snow anessent ialcommuni cat
iont oolsinbusi ness.Wi the-mai lyou
cansendandr ecei
v einst
antel
ectronicmessages,whi chwor ksli
kewr i
tinglet
ters.Your
messagesar edel
iveredinst
antl
ytopeopl eanywhereint hewor l
d, unli
ket r
adit
ionalmail
thattakesalotofti
me.Emai li
sfree,fastandverycheapwhencompar edtotelephone,
faxandpostalserv
ices.
24hour saday-7day saweek: I
nter
neti
sav ai
lable,24x7day sforusage.
I nf
ormati
on:Informati
onispr obablythebiggestadv antagei nternetisof f
eri
ng.
Ther ei sahugeamountofi nf ormat i
onav ailableont hei nt ernetforjustabout
ever y subj ect,rangi ng f rom gov ernmentl aw and ser vices,t rade fairs and
conf erences,mar keti nfor mat ion,new i deasand t echni calsuppor t
.Youcan
almostf indanyt ypeofdat aonal mostanyki ndofsubj ectt haty ouar el ooking
forbyusi ngsear chengi nesl ikegoogl e,yahoo, msn, etc.
OnlineChat :Youcanaccessmany‘ chatr ooms’ont hewebt hatcanbeusedt o
meetnewpeopl e,makenewf r i
ends,aswel last ost ayi nt ouchwi t
hol df ri
ends.
Youcanchati nMSNandy ahoowebsi tes.
Serv ices:Manyser vi
ces ar e pr ov i
ded on t he i nternetl ike netbanki ng,j ob
sear ching,pur chasi ngt ickets,hot elreserv ati
ons,gui danceser vi
cesonar r
ayof
topicsengul fi
ngev eryaspectofl ife.
Communi t
ies:Communi tiesofal ltypeshav espr ungupont hei nt
ernet .It’
sa
greatwayt omeetupwi thpeopl eofsi milari nterestanddi scusscommoni ssues.
E-commer ce:Al ongwi thget tinginf ormat i
onont heI nternet ,youcanal soshop
online.Ther ear emanyonl inest oresandsi test hatcanbeusedt ol ookf or
product saswel lasbuyt hem usi ngy ourcr edi tcar d.Youdonotneedt ol eave
yourhouseandcandoal ly ourshoppi ngf rom t heconv eni enceofy ourhome.I t
hasgotar ealamazi ngandwi der angeofpr oduct sf rom househol dneeds,
electroni cstoent ertainment .
Enter tainment :Inter netpr ovidesf aci
li
tyt oaccesswi der angeofAudi o/ Video
songs, playsfil
ms.Manyofwhi chcanbedownl oaded.Onesuchpopul arwebsi te
i
sYouTube.
Soft war eDownl oads:Youcanfr eelydownl oadi nnumer able,softwar esl i
ke
util
iti
es, games, musi c, v
ideos, mov i
es,etcf rom t heI nternet .
Li
mit
ati
onsofI
nter
net
Thef tofPer sonali nformat i
on:El ectronicmessagessentov ertheI nternetcanbeeasi l
y
snoopedandt racked, rev eali
ngwhoi st alkingt owhom andwhatt heyar et alkingabout .
Ify ouuset heI nternet,y ourper sonali nformat ionsuchasy ourname,addr ess,cr edit
car d,bankdet ai l
sandot heri nf ormat i
oncanbeaccessedbyunaut hor i
zedper sons.I f
youuseacr editcar dori nter netbanki ngf oronl i
neshoppi ng,theny ourdet ailscanal so
be‘ st olen’ .
Negat i
v eef fect sonf ami l
ycommuni cation:I tisgener al lyobser vedt hatduet omor e
time spenton I nternet ,t her ei s a decr ease i n communi cation and f eeling of
toget her nessamongt hef ami lymember s.
Inter netaddi ction:Ther ei ssomecont rover syov erwhet heri tispossi blet oact uallybe
addi ct edt ot heI nt
ernetornot .Somer esear cherscl ai mt hati ti
ssi mpl ypeopl et ryingt o
escapet hei rpr oblemsi nanonl i
newor l
d.
Chi ldrenusi ngt heI nternethasbecomeabi gconcer n.Mostpar entsdonotr ealizet he
danger si nv olvedwhent hei rchi l
drenl ogont otheI nt ernet .Whenchi l
dr ent alkt oot her s
online,t heydonotr eali
zet heycoul dact uallybet alkingt oahar mf ulper son.Mor eov er,
por nogr aphyi sal soav eryser iousi ssueconcer ni ngt heI nternet ,especi allywheni t
comest oy oungchi l
dren.Ther ear et housandsofpor nogr aphi csi tesont heI nternet
thatcanbeeasi lyfoundandcanbeadet rimentt ol ett i
ngchi l
drenuset heI nter net .
Virust hr eat :Today ,notonl yar ehumansget ti
ngv iruses,butcomput ersar eal so.
Comput er sar emai nlyget t
ingt hesev i
rusesf rom t heI nt er net.Virusi sapr ogr am whi ch
disrupt st henor malf unct ioni ngofy ourcomput ersy st ems.Comput ersat tachedt o
i
nt ernetar emor epronet ov irusat tacksandt heycanendupi ntocr ashingy ourwhol e
har ddi sk.
Spammi ng:I tisof tenv iewedast heactofsendi ngunsol icit
edemai l.Thi smul ti
pleor
vastemai lingi sof tencompar edt omassj unkmai lings.I tneedl esslyobst ructt heent ire
system.Mostspam i scommer ci
aladv er
tisi
ng,oft
enfordubiousproduct
s,get
-r
ich-
quickschemes,orquasi
-l
egalserv
ices.Spam coststhesenderver
yli
tt
letosendmost
ofthecostsar
epaidforbythereci
pientorthecarr
ier
srat
herthanbythesender
SERVI
CESOFI
NTERNET-
E-mai
l,
FTP,
Tel
net
Emai l,di scussi ongr oups,l ong- dist ancecomput ing,andf iletransf ersar esomeoft he
i
mpor tant ser vices pr ov ided by t he I nter net . Emai li st he f ast est means of
communi cat ion.Wi t
h emai lone can al so send sof twar e and cer t
ainf orms of
compr essed di gitali mage as an at tachment .News gr oups ordi scussi on gr oups
facilitat eI nter netusert oj oinf orv ari
ouski ndsofdebat e, discussi onandnewsshar ing.
Long- di st ancecomput ingwasanor i
ginali nspi r
at ionf ordev el
opmentofARPANETand
doesst i
llpr ov ideav eryusef ulser v i
ceonI nter net .Pr ogr ammer scanmai ntai naccount s
ondi st ant ,power fulcomput ersandexecut epr ogr ams.Fi l
et ransf erser viceal lows
Inter netuser st oaccessr emot emachi nesandr et rievepr ograms, dat aort ext .
E-Mai l( El ect roni cMai l
)
E-mai lorEl ect roni cmai lisapaper lessmet hodofsendi ngmessages,not esorl etters
from oneper sont oanot herorev enmanypeopl eatt hesamet i
mev i
aI nt ernet .E-mai lis
veryf astcompar edt ot henor malpost .E- mai lmessagesusual lyt akeonl yf ewseconds
toar ri
v eatt hei rdest inat ion.Onecansendmessagesany timeoft hedayorni ght ,and, it
wi l
lgetdel i
v eredi mmedi atel y.Youneednott owai tf ort hepostof fi
cet oopenandy ou
don’ thav et ogetwor riedabouthol iday s.I twor ks24hour sadayandsev enday saweek.
What ’
smor e,t hecopyoft hemessagey ouhav esentwi l
lbeav ail
abl ewhenev ery ou
wantt ol ookati tev eni nt hemi ddl eoft heni ght .Youhav et hepr iv i
legeofsendi ng
somet hi ngext rasuchasaf i
le, graphi cs, i
mageset c.al ongwi thy ouremai l.Thebi ggest
adv ant ageofusi ngemai list hati ti scheap, especi allywhensendi ngmessagest oot her
stat esorcount riesandatt hesamet i
mei tcanbedel iveredt oanumberofpeopl e
aroundt hewor l
d.I tal lowsy out ocomposenot e,gett headdr essoft her ecipientand
sendi t.Oncet hemai lisr ecei vedandr ead, itcanbef orwar dedorr eplied.Onecanev en
stor ei tf orl ateruse, ordel ete.I ne- mai lev ent hesendercanr equestf ordel iveryr ecei pt
andr eadr ecei ptf r
om t her eci pient .
(i)Feat ur esofE- mai l:
On e- to- oneorone- to- manycommuni cat ions
I nst antcommuni cat ions
Ph ysi cal pr esenceofr eci pienti snotr equi red
Mo sti nexpensi vemai l ser vices, 24-hour sadayandsev enday saweek
E ncour agesi nf ormal communi cations
(ii
)Component sofanE- mai lAddr ess
Asi nt hecaseofnor malmai lsy stem,e- mai li sal sobasedupont heconceptofa
recipi entaddr ess.Theemai laddr esspr ov i
desal loft hei nformat i
onr equi redt ogeta
messaget ot her ecipientf rom any wher ei nt hewor ld.Consi dert heemai l I
D.
j
ohn@hot mai l.
com
Int heabov eexampl ejohni st heuser nameoft heper sonwhowi l
lbesendi ng/ recei ving
theemai l.Hot mai list hemai lser v erwher et heuser namej ohnhasbeenr egi steredand
com i st het ypeofor gani zat ionont hei nter netwhi chi shost i
ngt hemai lser v er.
(b)FTP( Fi l
eTr ansf erPr ot ocol )
FileTr ansf erPr ot ocol ,i sanI nter netut i
litysof twar eusedt oupl oadedanddownl oad
fil
es.I tgi v esaccesst odi rect or i
esorf older sonr emot ecomput ersandal lowssof twar e,
dat aandt ex tfilest obet ransf er r
edbet weendi ffer entki ndsofcomput er s.
FTPwor ksont hebasi sofsamepr inci pleast hatofCl ient/Ser ver.FTP“ Cl i
ent ”i sa
progr am r unni ngony ourcomput ert hatenabl esy out ocommuni cat ewi thr emot e
comput er s.TheFTP cl ientt akesFTP commandandsendst heseasr equest sf or
i
nf or mat ionf rom t her emot ecomput erknownasFTPser vers.Toaccessr emot eFTP
serveritisrequir
ed,butnotnecessar yt ohav eanaccounti nt heFTPser ver
.Whenthe
FTPcl ientgetsconnect ed,FTPser verasksf ort heidenti
fi
cationi ntermsofUserLogin
nameandpasswor doft heFTPcl i
ent( Fig.3.1).Ifonedoesnothav eanaccountinthe
remot eFTPser ver,sti
llhecanconnectt otheser verusinganony mousl ogi
n.
Usinganony mousl oginany onecanl ogini nt oaFTPser verandcanaccesspubl i
c
archives;anywherei nthewor l
d,wi t
houthav i
nganaccount .Onecaneasi l
yLogint
othe
FTPsi tewiththeuser nameanony mousande- mailaddressaspasswor d.
(i
)Obj ecti
vesofFTP:
Pr ovidefl
exibi
li
tyandpr omot eshar i
ngofcomput erprograms, fi
lesanddat a
T ransferdatareli
ablyandmor eeffi
cientlyov ernetwork
E ncourageimpl i
citorindir
ectuseofr emot ecomput ersusingI nternet
S hieldauserf r
om v ari
ati
onsinst oragesy stemsamonghost s.
Thebasicstepsi nanFTPsessi on
St artupy ourFTP cl i
ent,byt ypingf tpony oursystem’
scommandl i
ne/
’C>’
prompt( or, ifyouareinaWi ndows, double-
cli
ckont heFTPicon).
Gi vetheFTPcl i
entanaddr esstoconnect .Thisist heFTPser veraddr
essto
whicht heFTPcl i
entwi l
lgetconnect ed
I denti
fyy our selftotheFTPr emot esitebygivingtheLoginName
Gi vether emot esiteapasswor d
Remot esi tewi l
lveri
fyt heLogi nName/ Passwordt oall
ow theFTP cli
entto
accessi tsfiles
Lookdi rector yforfi
lesinFTPser ver
ChangeDi rect ori
esifrequir
d
Sett het ransf ermode( opti
onal)
;
Gett hef il
e( s)y ouwant ,and
Qui t.
Dialupconnect i
on
Dial
-upreferst oanI nternetconnect i
ont hatisest abl
ishedusi ngamodem.Themodem
connectst hecomput ert o st andardphonel ines,whi chser veast hedat at r
ansfer
medium.Whenauseri nitiatesadi al-
upconnect i
on,t hemodem di alsaphonenumber
ofanI nt
ernetSer vi
cePr ov ider(ISP)thati sdesignatedt oreceivedi al-
upcalls.TheISP
then establishes t he connect i
on,whi ch usual l
yt akes aboutt en seconds and i s
accompani edbysev eralbeepi ngsandabuzzi ngsound.Af t
ert hedi al-
upconnect ion
hasbeenest abli
shed,i tisact i
v euntilt
heuserdi sconnect sf r
om t heI SP.Typical
ly,t
his
i
sdonebysel ectingt he“ Disconnect ”optionusingt heI SP’ssof t
war eoramodem ut i
lit
y
program.Howev er,ifadi al-upconnect i
oni sinter r
uptedbyani ncomi ngphonecal lor
someonepi ckingupaphonei nthehouse, t
heser vicemayal sobedi sconnected.
Advantages
LowPr ice
Secureconnecti
on–yourI
Paddresscont
inuall
ychanges
Offer
edi nrur
alar
eas–youneedaphoneline
Di
sadvantages
Slowspeed.
Phoneli
neisrequi
red.
Busysi
gnalsforfr
iendsandf
ami
l
ymember
s.
LeasedConnect ion
Leasedconnect i
oni saper manenttel
ephoneconnectionbetweentwopoi ntssetupby
at el
ecommuni cationscommoncar ri
er.Typi
call
y,l
easedli
nesar eusedbybusi nesses
toconnectgeogr aphi cal
l
ydi st
antoffi
ces.Unl i
kenormaldial-
upconnect i
ons,aleased
l
inei salwaysact i
v e.Thef eefortheconnectionisaf i
xedmont hl
yr ate.Theprimary
factor
saf f
ecti
ngt hemont hl
yfeearedi st
ancebetweenendpoi nt
sandt hespeedoft he
cir
cuit.Becauset heconnect i
on doesn’tcarryanybodyel se’
scommuni cati
ons,the
carri
ercanassureagi venlevelofquali
ty.
Forexampl e,a T- 1 channeli sat ype ofl eased l ine t hatpr ov i
des a maxi mum
transmi ssionspeedof1. 544Mbps.Youcandi vi
det heconnect ioni ntodi f
fer entl i
nes
fordat aandv oicecommuni cat i
onoruset hechannelf oronehi ghspeeddat aci r
cui t
.
Dividingt heconnect ioni scal ledmul ti
plexing.
Increasi ngly,leased l ines ar e bei ng used bycompani es,and ev en individual s,f or
Internetaccessbecauset heyaf for df ast erdat atransf err atesandar ecostef f ecti
v eif
theI nterneti susedheav il
y .
Adv ant age
Secur eandpr ivate: dedi catedexcl usivelyt othecust omer
Speed: symmet rical anddi r
ect
Reliable: minimum downt ime
Wi dechoi ceofspeeds: bandwi dt hondemand, easi l
yupgr adeabl e
Leasedl i
nesar esui tabl efori n-houseof ficewebhost i
ng
Disadv ant ages
Leasedl i
nescanbeexpensi vet oi nstallandr ent.
Notsui t
ablef orsi ngl eorhomewor kers
Leadt i
mescanbeasl ongas65wor kingday s
Distancedependentt onear estPOP
Leasedl ineshav et raditi
onal lybeent hemor eexpensi veaccessopt i
on.A Ser vi
ce
Lev elAgr eement( SLA)conf irmsan I SP’scont ractualr equirementi n ensur ing the
serv i
cei smai ntai ned.Thi sisof tenl ackingi ncheaperal t
er natives.
DSLconnect i
on
DigitalSubscr iberLi ne( DSL)i saf ami lyoft echnol ogiest hatpr ov idesdi gi taldat a
transmi ssionov ert hewi resofal ocalt elephonenet work.DSLor iginallystoodf ordi gital
subscr iberl oop.I nt el ecommuni cat ionsmar keti
ng,t het er m DSLi swi delyunder stood
tomeanAsy mmet ricDi git
alSubscr iberLi ne( ADSL) ,themostcommonl yinstal ledDSL
technol ogy .DSLser vicei sdel iver edsi mul taneouslywi t
hwi redt elephoneser viceont he
samet elephonel ine.Thi si spossi blebecauseDSLuseshi gherf r
equencybandsf or
dat asepar atedbyf il
ter i
ng.Ont hecust omerpr emi ses,aDSLf i
lt
eroneachout let
remov est hehi ghf requencyi nter fer ence,t oenabl esi mul taneoususeoft het elephone
anddat a.
Thedat abi tr at eofconsumerDSLser vicest ypicallyr angesf r
om 256kbi t/ st o40
Mbi t/si nt hedi rectiont othecust omer( downst ream) ,dependi ngonDSLt echnol ogy,
l
inecondi ti
ons,andser vi
ce-lev eli mpl ement at
ion.I nADSL,t hedat at hroughputi nthe
upst ream di rect ion,( the di rection t ot he ser v i
ce pr ov i
der)i sl ower ,hence t he
desi gnat on of asy
i mmet ri
c ser v ice.I n Sy mmet ri
c Di gi t
alSubscr iberLi ne ( SDSL)
serv i
ces, thedownst ream andupst ream dat aratesar eequal .
Adv antages:
Securit
y :Unlikecabl emodems,eachsubscr ibercanbeconf igur
edsot hatitwillnot
beont hesamenet wor k.Insomecabl emodem net works,
othercomput er
sont hecabl e
modem net wor kar eleftv i
siblyv ulnerabl
eandar eeasil
ysuscept i
bletobreakinaswel l
asdat adest ruction.
I
ntegration:DSLwi l
l easilyinterfacewi t
hATM andWANt echnology.
Highbandwi dth
Cheapl i
nechar gesfrom t hephonecompany .
Goodf or“bur sty”tr
aff i
cpat terns
Disadvant ages
Nocur rentst andardizat i
on:Aper sonmov i
ngf r
om oneareat oanothermightfindthat
theirDSL modem i sj ustanot herpaper weight.Customers mayhav et o buynew
equipmentt osi mplychangeI SPs.
Expensive:Mostcust omersarenotwi ll
i
ngtospendmor ethan$20to$25permont h
forInternetaccess.Currentinst
all
ati
oncosts,includi
ngthemodem,canbeashi ghas
$750.Pr i
cesshouldcomedownwi thi
n1- 3y ear
s.Aswi thallcomputert
echnology,
beingf i
rstusual
lymeansanempt i
erwall
et.
DistanceDependence:Thef ar
theryouli
vefrom theDSLAM (DSLAccessMult
ipl
exer),
thel owerthedatarate.Thelongestrunlengt
hsar e18,000f
eet,oral
it
tl
eover3miles.
CableModem Connect i
on
Acablemodem i sat ypeofNet workBridgeandmodem thatpr
ovidesbidir
ectionaldat
a
communi cat
ionviaradiofrequencychannelsonaHFCandRFoGi nfr
astructure.Cabl
e
modemsar epri
mar i
lyusedt odeliverbroadbandI
nter
netaccessinthef orm ofcable
Int
ernet
,taki
ngadv antageofthehi ghbandwi dt
hofaHFCandRFoGnet work.Theyare
commonl ydepl
oyedi nAustral
ia,Europe,Asi
aandAmericas.
Fi
g.3.
2:Cabl
emodem connect
ion
Disadv antages
Cabl einternettechnologyexcelsatmai ntai
ningsignalstrengt hoverdistance.Onceit
i
sdel i
veredt oar egion,howev er,suchasanei ghborhood, i
tisspl i
tamongt hatregi
ons
subscr ibers.Whi leincreasedcapaci t
yhasdi mi ni
shedt heef fectsomewhat ,itissti
ll
possi blethatuser swi l
lseesignifi
cantl
yl owerspeedsatpeakt imeswhenmor epeople
areusi ngt heshar edconnect ion.Bandwi dthequal smoney ,socabl e’
sadv antagein
throughputcomeswi t
hapr i
ce.Ev eninpl ansofsi milarspeedscompar edwi thDSL,
customer sspendmor eperMbwi thcablethant heydowi thDSL.
I
t’shar dt oi magine,buttherear esti
llpocketsoft heUni tedSt at
eswi t
houtadequat e
cablet elevisionser vi
ce.Therear efarf ewersuchpocket swi t
houtr esi
dentialland-
li
ne
servicemeani ngcableinter
netisonbal ancelessaccessi bleinremot eareas.
VSAT
Shor tf orv ery smal laper t
ur et erminal ,an ear thbound st ation used i n sat el
li
te
communi cationsofdat a,voiceandv ideosi gnal
s,excl udingbr oadcastt elevision.A
VSATconsi stsoft wopar ts,at ransceivert hatisplacedout door sindi rectl i
neofsi ght
tot hesat ell
iteandadev i
cethati spl acedi ndoor stointer f
acet het ranscei verwi tht he
enduser ’
scommuni cat i
onsdev i
ce,suchasaPC.Thet ranscei verrecei vesorsendsa
signal t
oasat el
li
tetransponderi nthesky .Thesat ell
it
esendsandr eceivessi gnal sf r
om
agr ound st ation comput ert hatact sasahub f ort hesy stem.Each end useri s
i
nt erconnect edwi tht hehubst ati
onv iat hesat ell
it
e,formi ngast art opol ogy.Thehub
cont rol
st heent i
reoper ati
onoft henet wor k.Foroneendusert ocommuni catewi th
anot her,eacht r
ansmi ssi
onhast of i
rstgot othehubst ationthatt henr etransmi tsitv i
a
thesat ell
itetot heotherenduser ’sVSAT.
Advantages
Satel
li
tecommuni cat
ionsy st
emshav esomeadv ant
agest
hatcanbeexpl
oit
edf
ort
he
provi
si
onofconnect i
vit
y.Theseare:
CostsInsensi
ti
vetoDi st
ance
Singl
ePlatfor
m servi
cedel i
ver
y(one-
stop-
shop)
Flexi
bil
it
y
Upgradeable
Lowi ncr
ementalcostsperunit
Di
sadvantages
Howev
erl i
keallsyst
emsther
earedi
sadvant
agesal
so.Someoft
hesear
e
Hi ghstart-
up cost
s(hubsand basi
celementsmustbeinplacebef
oret
he
servi
cescanbepr ov i
ded)
Higherthannor mal ri
skpr ofil
es
Severeregulatoryrestrict
ionsimposedbycount ri
est hatpreventVSATnetworks
andsolutionsfrom reachingcr it
icalmassandtheref
or eprofi
tabi
li
ty
Someser v i
cequalitylimit
at i
onssucht hehi
ghsignaldelays(l
atency)
Naturalavail
abil
it
ylimi tsthatcannotbemi t
igat
edagai nst
Lackofski ll
sr equiredi nt hedev el
opingworl
dt odesi gn,i
nstallandmaint
ain
satel
li
tecommuni cationsy stemsadequatel
y