Professional Documents
Culture Documents
Paactical No. 8
Aim P2092am toImplement Eiend funrion
Reswt
e able Lo u0de poq2am to implenmen
iehd uhciion
Poatica Relaled oueTHions
Can membe FuhcHon s of one class be
foiend punctions of anohey class?
a) YesS
b folse
hefolloainq uel not
LOL no
3 alhich of
arrecthe iend unton?
a) funcibn decdaoalioh
EXerase
alieg Ctt paDqadm to U0aphe Vole)_
o Hoo Vaaobles usibq fiend Fuhcion
tinclude Cioeam.hy
USing nameJpace Jd
CssSwap
intLempgb
publiC
Swap u n a in b)_
this- g=g
Hhis>b=b
3
Void Swap (Swapf s)
Lh majn
Hincludeio J am.h
UJingname spa c e d
class DP
Publi
float distm
publit
b C) bitahe
bianee Ona-eed
Lhnghe
COd<<'\n\t
Ente
-
Cin > dinm
d d2
totaldiit CDM
piehd aid
bM d2
Void totalditt CDdL
3 da ditm
ditm
float dit = dl
'\nTOtal bLtah Ce h mgeM=>
COt
_ditt
3
in main ( )
DM d2
ialdit Cdi, da)
Aa
ShouD A(a)
Hinclude iosmeamh 20
lgssBoX gR USing
pho iehs uhtton
double width Fo pintwidh
public ahd muHplio
Piend voi pintwidh C80X box )z h e ordth
Void sahuoioth doublo ohd ) V.ouue by
Some A0t
wiqh Ordj Hal oLutpu
3
Vol pintuwrdh ( Box box)
DATE
BoX boX
lo0xJe lid h C1b.0)
pintididth CboxL