0% found this document useful (0 votes)
8 views

Structured

Structures in CS

Uploaded by

hawkinsgray4
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Structured

Structures in CS

Uploaded by

hawkinsgray4
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

St

ruct
uredpr
ogr
ammi
ngal
soknownasModul
arpr
ogr
ammi
ngi
sanappr
oacht
owr
it
ingapr
ogr
am t
hat
ar
eeasi
ert
otest
,debug,modi
fy,andmai
ntai
nbyenf
orci
ngamodul
arappr
oachwhi
chbr
eaksal
arge
compl
expr
obl
em i
ntosub–r
out
ines.

Pr
ogr
ammi
ngpar
adi
gm i
saf
undament
alst
yleofcomput
erpr
ogr
ammi
ng,
awayofbui
l
dingt
hest
ruct
ure
andel
ement
sofcomput
erpr
ogr
ams.Ther
ear
efourmai
npar
adi
gms

1.Unst
ruct
uredPr
ogr
ammi
ng

I
nunst
ruct
uredpr
ogr
ams,
thest
atement
sar
eexecut
edi
nsequence(
oneaf
tert
heot
her
)aswr
it
ten.Thi
s
t
ypeofpr
ogr
ammi
ngusest
heGoTost
atementwhi
chal
l
owscont
rolt
obepassedt
oanyot
hersect
ioni
n
t
hepr
ogr
am.

2.St
ruct
uredPr
ogr
ammi
ng

The appr
oach was dev
eloped as a sol
uti
on t
othe chal
l
enges posed by unst
ruct
ured/
procedur
al
pr
ogr
ammi
ng.St
ruct
uredPr
ogr
ammi
ngf
requent
lyempl
oysat
opdowndesi
gnmodel
,inwhi
cht
he
dev
eloper
sbr
eakst
heov
eral
lpr
ogr
am i
ntost
ruct
uresi
ntosepar
atesubsect
ions

Exampl
esofst
ruct
uredpr
ogr
ammi
ngl
anguagesar
e

• C
• Pascal
• For
tran

• Cobol
• ALGOL
• Adae.
t.
c
3.Obj
ectOr
ient
edPr
ogr
ammi
ng(
OOP)

Thi
sisapr
ogr
ammi
ngpar
adi
gm t
hatr
epr
esent
sconcept
sas“
Obj
ect
”thathav
edat
afi
elds(
att
ri
but
es
t
hatdescr
ibet
heobj
ect
)andassoci
atedpr
ocedur
esknownasmet
hods.Obj
ect
s,whi
char
eusual
l
y
i
nst
ancesofcl
asses,ar
eused t
oint
eractwi
thoneanot
hert
o desi
gnappl
i
cat
ionsand comput
er
pr
ogr
ams.

4.Vi
sualPr
ogr
ammi
ng

Av
isualPr
ogr
ammi
ngl
anguageusesav
isualr
epr
esent
ati
on(
suchasgr
aphi
cs,dr
awi
ngs,ani
mat
ionor
i
cons,par
ti
all
yorcompl
etel
y).A v
isuall
anguage mani
pul
atev
isuali
nfor
mat
ion orsuppor
tvi
sual
i
nter
act
ion,
oral
l
owspr
ogr
ammi
ngwi
thv
isual
expr
essi
on

1
5.I
nter
netBasedPr
ogr
ammi
ng

Thi
sispr
ogr
ammi
ngor
ient
edt
othedev
elopmentofi
nter
netappl
i
cat
ionsl
anguagesandt
ool
ssucgas
PHP,
ASP,
Per
l,Jav
aScr
ipt
,HTML,
Jav
aet
c.

CHARACTERI
STI
CSOFAGOODPROGRAM

• Por
tabi
li
ty/
Transf
erabi
li
ty:Mustbeabl
etowor
konanycomput
ermachi
ne.

• Rel
iabi
li
ty:
Itcanber
eli
edupont
odowhati
tisexpect
edt
odo

• Ef
fi
ciency
/costsav
ing:I
tmustnotcostmor
ethani
tsbenef
it
sandenabl
espr
obl
em t
o
besol
vedappr
opr
iat
ely
,qui
ckl
yandef
fi
ci
ent
ly.

• Cl
ari
tyandSi
mpl
ici
ty:
Itshoul
dbeassi
mpl
easpossi
blet
ounder
stand.

• Under
standabi
li
ty/
Readabi
li
ty:I
tmustbe r
eadabl
e and under
standabl
e by ot
her
pr
ogr
ammer
sandenduser
s.
• Fl
exi
bil
it
y/Adapt
abi
li
ty/
Mai
ntai
nabi
li
ty:Agoodpr
ogr
am mustbef
lexi
bleadapt
abl
eand
mai
ntai
nabl
einor
dert
osui
tuser
’sneed.Modi
fi
cat
ionmustbepossi
bleandv
eryeasy
.

PHASESOFPROGRAM DEVELOPMENT(
PROGRAMMI
NG)

Thepr
ocessofpr
oduci
ngacomput
erpr
ogr
am (
sof
twar
e)maybedi
vi
dedi
ntoei
ghtphasesor
st
ages:

1)Pr
obl
em def
ini
ti
on/
Anal
ysi
s

2)Sel
ect
ionordev
elopmentofanal
gor
it
hm

3)Desi
gni
ngt
hepr
ogr
am

4)Codi
ngt
hepr
ogr
ammi
ngst
atement
s

5)Compi
l
ing/
Compi
l
ati
onst
age

6)Test
ing/
Runni
ngandDebuggi
ngt
hepr
ogr
am 7)Document
ati
on.

8)Mai
ntenance

1) Pr
obl
em Def
ini
ti
on/
Anal
ysi
s St
age:Ther
eis need t
o under
stand t
he pr
obl
em t
hat
r
equi
resasol
uti
on.Theneedt
odet
ermi
net
hedat
atobepr
ocessed,f
orm ort
ypeoft
hedat
a,
v
olumeoft
hedat
a,whatt
obedonet
othedat
atopr
oducet
heexpect
ed/
requi
redout
put
.

2) Sel
ect
ionordev
elopmentofanal
gor
it
hm:Anal
gor
it
hm i
sthesetofst
epsr
equi
redt
o

2
sol
veapr
obl
em wr
it
tendowni
nEngl
i
shl
anguage.

3) Desi
gni
ng t
he pr
ogr
am:I
n or
dert
o mi
nimi
ze t
he amountoft
ime t
o be spenti
n
dev
elopi
ngt
hesof
twar
e,t
hepr
ogr
ammermakesuseoff
lowchar
t.Fl
owchar
tist
hepi
ctor
ial
r
epr
esent
ati
onoft
heal
gor
it
hm dev
elopedi
nst
ep2abov
e.

4) Codi
ngt
hest
atement
:Thi
sinv
olv
eswr
it
ingt
hepr
ogr
am st
atement
s.Thepr
ogr
ammer
usest
hepr
ogr
am f
lowchar
tasagui
def
orcodi
ngt
hest
epst
hecomput
erwi
l
lfol
l
ow.

5) Compi
li
ng:Ther
eisneedt
otr
ansl
atet
hepr
ogr
am f
rom t
hesour
cecodet
othemachi
ne
orobj
ectcodei
fiti
snotwr
it
teni
nmachi
nel
anguage

6) Runni
ng,Test
ingandDebuggi
ng:Whent
hecomput
eri
sact
ivat
edt
orunapr
ogr
am,i
t
mayf
indi
tdi
ff
icul
ttor
uni
tbecauseer
ror
s(sy
ntax,semant
icsorl
ogi
c,orr
unt
ime)mi
ghthav
e
beencommi
tt
ed.

7) Document
ati
on:Thi
sist
hel
astst
agei
nsof
twar
edev
elopment
.Thi
sinv
olv
eskeepi
ng
wr
it
tenr
ecor
dst
hatdescr
ibet
hepr
ogr
am,expl
aini
tspur
poses,def
inet
heamount
,ty
pesand
sour
cesofi
nputdat
arequi
redt
oruni
t

8) Mai
ntenance:Al
ltheact
ivi
ti
est
hatoccuraf
tert
hecompl
eti
onoft
hepr
ogr
am come
undert
hepr
ogr
am mai
ntenance.Pr
ogr
am mai
ntenancei
ncl
udest
hef
oll
owi
ng:Fi
ndi
ngand
cor
rect
ingt
heer
ror
s;Modi
fyi
ngt
hepr
ogr
am t
oenhancei
t–i
.e.
,adapt
ingt
osomenewconcept
s
orwhent
her
eisachangei
nthehar
dwar
eoroper
ati
ngsy
stem;Updat
ethedocument
ati
on;Add
newf
eat
uresandf
unct
ions;
Remov
eusel
essorr
edundantpar
tsofcode.

Adv
ant
agesofSt
ruct
uredPr
ogr
ammi
ngAppr
oach:

1. Easi
ert
oreadandunder
stand
2. UserFr
iendl
y
3. Easi
ert
oMai
ntai
n
4. Mai
nlypr
obl
em basedi
nst
eadofbei
ngmachi
nebased
5. Devel
opmenti
seasi
erasi
trequi
resl
essef
for
tandt
ime
6. Easi
ert
oDebug
7. Machi
ne-
Independent
,most
ly.

Di
sadv
ant
agesofSt
ruct
uredPr
ogr
ammi
ngAppr
oach:

1. Si
ncei
tisMachi
ne-
Independent
,Soi
ttakest
imet
oconv
erti
ntomachi
necode.

3
2. Theconver
tedmachi
necodei
snott
hesameasf
orassembl
ylanguage.
3. Thepr
ogr
am dependsuponchangeabl
efact
orsl
i
kedat
a-t
ypes.Ther
efor
eitneedst
obeupdat
ed
wi
tht
heneedont
hego.

St
ruct
uredPr
ogr
ammi
ngEl
ement
s

St
ruct
ured pr
ogr
ammi
ng el
ement
s can be cat
egor
ies i
ntot
hree,namel
y;cont
rolst
ruct
ures,
subr
out
ines,
andbl
ocks.

1. Cont
rolst
ruct
ures:Fol
l
owi
ng t
he st
ruct
ured pr
ogr
am t
heor
em,al
lpr
ogr
ams ar
e seen as
composedoft
hreecont
rol
str
uct
ures:
"
Sequence"
;or
der
edst
atement
sorsubr
out
inesexecut
edi
nsequence.
"
Sel
ect
ion"
;oneoranumberofst
atement
sisexecut
eddependi
ngont
hest
ateoft
hepr
ogr
am.

"
It
erat
ion"
;ast
atementorbl
ocki
sexecut
edunt
ilt
hepr
ogr
am r
eachesacer
tai
nst
ate,
oroper
ati
onshav
e
beenappl
i
edt
oev
eryel
ementofacol
l
ect
ion.

2. Subr
out
ines:subr
out
inesar
ecal
l
abl
euni
tssuchaspr
ocedur
es,f
unct
ions,met
hods,or
subpr
ogr
amsar
eusedt
oal
l
owasequencet
ober
efer
redt
obyasi
ngl
est
atement
.

3. Bl
ocks:Bl
ocksar
eusedt
oenabl
egr
oupsofst
atement
stobet
reat
edasi
ftheywer
eone
st
atement
.

STRUCTUREDDESI
GNPRI
NCI
PLES
St
ruct
ureddesi
gni
sasof
twar
edesi
gnmet
hodt
hatemphasi
zesbr
eaki
ngapr
ogr
am downi
ntosmal
l
er
modul
esorf
unct
ions,
eachofwhi
chper
for
msaspeci
fi
ctask.

.Her
ear
eaf
ew:
Modul
ari
ty:Di
vi
ding a pr
ogr
am i
nto smal
l
er,i
ndependentuni
tscal
l
ed modul
esmakesi
teasi
ert
o
under
stand,
modi
fy,
andt
est
.

Decomposi
ti
on:Thi
spr
inci
plei
nvol
vesbr
eaki
ngdownal
arge,compl
expr
obl
em i
ntosmal
l
er,mor
e
manageabl
epi
eces.

Abst
ract
ion:Thi
spr
inci
plei
nvol
vessepar
ati
ngt
heessent
ialf
eat
uresofapr
obl
em orsol
uti
onf
rom t
he
unnecessar
ydet
ail
s.

Dat
a hi
ding:Thi
s pr
inci
plei
nvol
ves pr
otect
ing t
he i
nter
naldat
a ofa modul
efr
om acci
dent
alor
unaut
hor
izedaccess.

I
nfor
mat
ionhi
ding:Thi
spr
inci
plei
nvol
vessepar
ati
ngt
hei
nter
faceofamodul
e(t
hepar
tthati
svi
sibl
eto

4
ot
herpar
tsoft
hepr
ogr
am)f
rom i
tsi
mpl
ement
ati
on(
thei
nter
nal
det
ail
sofhowi
tper
for
msi
tst
ask)
.

ABSTRACTI
ON

Dat
aabst
ract
ioni
sther
educt
ionofapar
ti
cul
arbodyofdat
atoasi
mpl
i
fiedr
epr
esent
ati
onoft
hewhol
e.
Abst
ract
ion,i
ngener
al,i
sthepr
ocessofr
efi
ningort
aki
ngawayorr
emov
ingchar
act
eri
sti
csf
rom
somet
hingi
nor
dert
oreducei
ttoasetofessent
ial
char
act
eri
sti
cs.

MODULARI
TY

Modul
arpr
ogr
ammi
ngi
sthepr
ocessofsubdi
vi
dingacomput
erpr
ogr
am i
ntosepar
atesubpr
ogr
ams.

ADVANTAGESOFUSI
NGMODULARPROGRAMMI
NG

EaseofUse:Thi
sappr
oachal
l
owssi
mpl
i
cit
y,asl
i
nesofpr
ogr
am codecanbeaccessedi
nthef
orm of
modul
es,
rat
hert
hanf
ocusi
ngont
heent
ir
ethousandsandmi
l
li
onsofl
i
nescode.

Reusabi
li
ty:I
tal
l
owst
heusert
oreuset
hef
unct
ional
i
tywi
thadi
ff
erenti
nter
facewi
thoutt
ypi
ngt
hewhol
e
pr
ogr
am agai
n.

EaseofMai
ntenance:I
thel
psi
nlesscol
l
isi
onatt
het
imeofwor
kingonmodul
es,
hel
pingat
eam t
owor
k
wi
thpr
opercol
l
abor
ati
onwhi
l
ewor
kingonal
argeappl
i
cat
ion

MODULARPROGRAMMI
NGI
NC

Ci
s cal
l
ed a st
ruct
ured pr
ogr
ammi
ng l
anguage because t
o sol
veal
arge pr
obl
em,C
pr
ogr
ammi
ngl
anguagedi
vi
dest
hepr
obl
em i
ntosmal
l
ermodul
escal
l
edf
unct
ionsorpr
ocedur
es
eachofwhi
chhandl
esapar
ti
cul
arr
esponsi
bil
i
ty.Thepr
ogr
am whi
chsol
vest
heent
ir
epr
obl
em i
s
acol
l
ect
ionofsuchf
unct
ions.

Amodul
eisbasi
cal
l
yasetofi
nter
rel
atedf
il
est
hatshar
ethei
rimpl
ement
ati
ondet
ail
sbuthi
dei
tfr
om t
he
out
sidewor
ld

Modul
ari
zat
ioni
samet
hodt
oor
gani
zel
argepr
ogr
amsi
nsmal
l
erpar
ts,
i.
e.,
themodul
es.

Modul
ari
zat
ionhassev
eral
benef
it
s,especi
all
yonl
argeandcompl
expr
ogr
ams:

• modul
escanber
e-usedi
nsev
eral
proj
ect
s;

• changi
ngt
hei
mpl
ement
ati
ondet
ail
sofamodul
esdoesnotr
equi
ret
omodi
fyt
hecl
i
ent
s
usi
ngt
hem asf
arast
hei
nter
facedoesnotchange;

• f
ast
err
e-compi
l
ati
on,as onl
ythe modul
es t
hathav
e been modi
fi
ed ar
e act
ual
l
y
r
ecompi
l
ed;

5
• sel
f-
document
ing,ast
hei
nter
facespeci
fi
esal
lthati
srequi
redt
oknow t
ouset
he
modul
e;
• easi
erdebuggi
ng,
asmodul
esdependenci
esar
ecl
ear
lyspeci
fi
edandev
erymodul
ecan
bet
est
edsepar
atel
y.

Pr
ogr
ammi
ngbymodul
esusi
ngt
heCl
anguagemeansspl
i
tti
ngev
erysour
cecodei
ntoanheaderf
il
e
modul
e1.
hthatspeci
fi
eshow t
hatmodul
etal
kst
othecl
i
ent
s,andacor
respondi
ngi
mpl
ement
ati
on
sour
cef
il
emodul
e1.
cwher
eal
lthecodeandt
hedet
ail
sar
ehi
dden.

CFunct
ions

Af
unct
ioni
sagr
oupofst
atement
sthatt
oget
herper
for
m at
ask.Ev
eryCpr
ogr
am hasatl
east
onef
unct
ion,
whi
chi
smai
n()
,andal
lthemostt
ri
vi
alpr
ogr
amscandef
ineaddi
ti
onal
funct
ions.

Af
unct
iondecl
arat
iont
ell
sthecompi
l
eraboutaf
unct
ion'
sname,
ret
urnt
ype,
andpar
amet
ers.A
f
unct
iondef
ini
ti
onpr
ovi
dest
heact
ual
bodyoft
hef
unct
ion.

Af
unct
ioncanal
sober
efer
redasamet
hodorasub-
rout
ineorapr
ocedur
e,et
c.

Def
ini
ngaFunct
ion

Thegener
alf
orm ofaf
unct
iondef
ini
ti
oni
nCpr
ogr
ammi
ngl
anguagei
sasf
oll
ows

r
etur
n_t
ypef
unct
ion_
name(par
amet
erl
i
st){ bodyoft
hef
unct
ion

Af
unct
iondef
ini
ti
oni
nCpr
ogr
ammi
ngconsi
stsofaf
unct
ionheaderandaf
unct
ionbody
.Her
e
ar
eal
lthepar
tsofaf
unct
ion–

• Ret
urnTy
pe−Af
unct
ionmayr
etur
nav
alue.Ther
etur
n_t
ypei
sthedat
aty
peoft
hev
aluet
he
f
unct
ionr
etur
ns.Somef
unct
ionsper
for
mthedesi
redoper
ati
onswi
thoutr
etur
ningav
alue.I
n
t
hiscase,
ther
etur
n_t
ypei
sthekey
wor
dvoi
d.

• Funct
ionName−Thi
sist
heact
ualnameoft
hef
unct
ion.Thef
unct
ionnameandt
hepar
amet
er
l
i
stt
oget
herconst
it
utet
hef
unct
ionsi
gnat
ure.

• Par
amet
ers−Apar
amet
eri
sli
keapl
acehol
der
.Whenaf
unct
ioni
sinv
oked,
youpassav
aluet
o
t
hepar
amet
er.Thi
sval
uei
sref
err
edt
oasact
ualpar
amet
erorar
gument
.Thepar
amet
erl
i
st
r
efer
stot
het
ype,or
der
,andnumberoft
hepar
amet
ersofaf
unct
ion.Par
amet
ersar
eopt
ional
;
t
hati
s,af
unct
ionmaycont
ainnopar
amet
ers.

• Funct
ionBody−Thef
unct
ionbodycont
ainsacol
l
ect
ionofst
atement
sthatdef
inewhatt
he

6
f
unct
iondoes.

FUNCTI
ONDECLARATI
ON

Af
unct
iondecl
arat
iont
ell
sthecompi
l
eraboutaf
unct
ionnameandhowt
ocal
lthef
unct
ion.The

act
ual
bodyoft
hef
unct
ioncanbedef
inedsepar
atel
y.Af
unct
iondecl
arat
ionhast
hef
oll
owi
ng

par
ts−r
etur
n_t
ypef
unct
ion_
name(par
amet
erl
i
st)
;

Fort
heabov
edef
inedf
unct
ionmax(
),t
hef
unct
iondecl
arat
ioni
sasf
oll
ows−

i
ntmax
(intnum1,
intnum2)
;

Par
amet
ernamesar
enoti
mpor
tanti
nfunct
iondecl
arat
iononl
ythei
rty
pei
srequi
red,sot
he

f
oll
owi
ngi
sal
soav
ali
ddecl
arat
ion−i
ntmax(
int
,int
);

Funct
iondecl
arat
ioni
srequi
redwheny
oudef
ineaf
unct
ioni
nonesour
cef
il
eandy
oucal
lthat
f
unct
ioni
nanot
herf
il
e.I
nsuchcase,
youshoul
ddecl
aret
hef
unct
ionatt
het
opoft
hef
il
ecal
l
ing
t
hef
unct
ion.

CALLI
NGAFUNCTI
ON

Whi
l
ecr
eat
ingaCf
unct
ion,
yougi
veadef
ini
ti
onofwhatt
hef
unct
ionhast
odo.Touseaf
unct
ion,
y
ouwi
l
lhav
etocal
lthatf
unct
iont
oper
for
mthedef
inedt
ask.

Whenapr
ogr
am cal
l
saf
unct
ion,t
hepr
ogr
am cont
roli
str
ansf
err
edt
othecal
l
edf
unct
ion.A
cal
l
edf
unct
ionper
for
msadef
inedt
askandwheni
tsr
etur
nst
atementi
sexecut
edorwheni
ts
f
unct
ion-
endi
ng cl
osi
ng br
acei
sreached,i
tret
urnst
hepr
ogr
am cont
rolbackt
othemai
n
pr
ogr
am.

Tocal
laf
unct
ion,
yousi
mpl
yneedt
opasst
her
equi
redpar
amet
ersal
ongwi
tht
hef
unct
ionname,
andi
fthef
unct
ionr
etur
nsav
alue,
theny
oucanst
oret
her
etur
nedv
alue.Forexampl
e−

#i
ncl
ude<st
dio.
h>/
*

f
unct
iondecl
arat
ion*
/int

max(
intnum1,
intnum2)
;int

mai
n(){

/
*local
var
iabl
edef
ini
ti
on*
/

i
nta=100; i
ntb=200; i
nt

7
r
et;

/
*cal
l
ingaf
unct
iont
ogetmaxv
alue*
/

r
et=max(
a,b)
; pr
int
f("
Maxv
aluei
s:

%d\
n",
ret)
;ret
urn0;

/
*funct
ionr
etur
ningt
hemaxbet
weent
wonumber
s

*
/intmax(
intnum1,
intnum2){ /
*local
var
iabl
e

decl
arat
ion*
/ i
ntr
esul
t;

i
f(num1>num2)

r
esul
t=num1;

el
se r
esul
t=

num2; r
etur
n

r
esul
t;

Wehav
ekeptmax
()al
ongwi
thmai
n()andcompi
l
edt
hesour
cecode.Whi
l
erunni
ngt
hef
inal
execut
abl
e,i
twoul
dpr
oducet
hef
oll
owi
ngr
esul
t−

Maxv
aluei
s:200

FUNCTI
ONARGUMENT

I
faf
unct
ioni
sto usear
gument
s,i
tmustdecl
arev
ari
abl
est
hatacceptt
hev
aluesoft
he
ar
gument
s.Thesev
ari
abl
esar
ecal
l
edt
hef
ormal
par
amet
ersoft
hef
unct
ion.

STEPWI
SEREFI
NEMENT

St
epwi
ser
efi
nementi
sasof
twar
edev
elopmentt
echni
quet
hati
nvol
vesbr
eaki
ngdownal
argerpr
obl
em
i
ntosmal
l
er,mor
emanageabl
epr
obl
emsandt
hensol
vi
ngt
hosepr
obl
emsonebyone.Thi
spr
ocessof

8
br
eaki
ngdownapr
obl
em i
ntosmal
l
er,
mor
eeasi
l
ysol
vabl
esubpr
obl
emsi
scal
l
eddecomposi
ti
on

EXAMPLE

Themostef
fect
ivewayt
osol
veacompl
expr
obl
em i
stobr
eaki
tdowni
ntosuccessi
vel
ysi
mpl
er
subpr
obl
ems.

•Youst
artbybr
eaki
ngt
hewhol
etaskdowni
ntosi
mpl
erpar
ts.

•Someoft
hoset
asksmayt
hemsel
vesneedsubdi
vi
si
on.

•Thi
spr
ocessi
scal
l
edst
epwi
ser
efi
nementordecomposi
ti
on.

Cr
it
eri
aforChoosi
ngaDecomposi
ti
on

1.Thepr
oposedst
epsshoul
dbeeasyt
oexpl
ain.Onei
ndi
cat
iont
haty
ouhav
esucceededi
sbei
ng
abl
etof
indsi
mpl
enames.
2.Thest
epsshoul
dbeasgener
alaspossi
ble.Pr
ogr
ammi
ngt
ool
sgetr
eusedal
lthet
ime.I
fyour
met
hodsper
for
m gener
alt
asks,
theyar
emucheasi
ert
oreuse.
3.Thest
epsshoul
dmakesenseatt
hel
evelofabst
ract
ionatwhi
cht
heyar
eused.I
fyouhav
ea
met
hodt
hatdoest
her
ightj
obbutwhosenamedoesn’
tmakesensei
nthecont
extoft
he
pr
obl
em,
iti
spr
obabl
ywor
thdef
ini
nganewmet
hodt
hatcal
l
stheol
done.

You might also like