0% found this document useful (0 votes)
54 views4 pages

20pc18 CPP

1. A derived class inherits attributes and behaviors from its base class and can add additional attributes and behaviors of its own. 2. When a derived class object is assigned to a variable of the base class type, only the attributes and behaviors of the base class are accessible via that variable. 3. Defining a virtual destructor in the base class ensures the proper derived class destructor is called when a derived class object is deleted through a base class pointer.

Uploaded by

Keerthana S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views4 pages

20pc18 CPP

1. A derived class inherits attributes and behaviors from its base class and can add additional attributes and behaviors of its own. 2. When a derived class object is assigned to a variable of the base class type, only the attributes and behaviors of the base class are accessible via that variable. 3. Defining a virtual destructor in the base class ensures the proper derived class destructor is called when a derived class object is deleted through a base class pointer.

Uploaded by

Keerthana S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

1 on

epestor 1
yhkoaded as
meoraer ,jF
muyt be
Aideopnetov
dmust Lo Membs o
be ostveam ishve
closs . tat its o
nof
t possible to medij ape olessa

NoNo e canvardead U dr ratov s


e aAse pan a p z e l e r
Ahee
heesdo nol lake ang

Aenaa derdien CaLlatie hnarsa,


nezzaer

ba efinetorm iyua unctio


un&tjo buse Class
bese an cd rulk es
whtela
e i fie l dein mine
( ( a l e d .

aple rrtndalea? uncttog

Astroct class on dines a t WTERFRLE Lat

does mc1 neress anlq prvide


does plim elal en p
de als nmep?benunc 1ors,
taleel
Aclass arth PORE VIR TURL unrlton
Mesnt A be
s

tesol as
olstvat. s Thes Class s
s e s Con
c l a sses
utruch o r clas
a PASE c l a s s r o
dorrieed/.
CONCPEAT (LAss derrived class hef Lanplemeas
Cub e avs)Anq enelioa lety
T A L BiNDINGT .happens a
CoMPILE
autile DYNAMI bun lin g Aappons a Runtime

n
)Sn AMatie undng al the ndor arnlias
Peeded Cace a enetio2 as a u r alle a l

COMPILE THEF
ul en
tObene a s Xley Mait ben eleng hepans
a sndor matio
Coapiler Cantt delerpin e
aee af ompile 7
1 e d ed a e n tien

oU TPV T

il
t
a s (aught

lo e c a u g h t . Jhe
derrivd class ohiet
Jor
be dePiaed
Lloeck must
Catcb
doruvtd class athblek .

l e base Class
Pruor
pe aN ead odee

xists

os:: out oeans wRITE odss

the tonteat of ile


nelvuncd newile s Created.

os f f 0w dal a

file cveate4.
il no1 found Naer

opnsile an n ard mod=

te poiTions le fouler ad ENOF F)LE


10
Os: Trunc i l e ound epae t ond doles
all tonl enl

Horptaj hen derivd tlass objeel i ossign ol Ta


a hose rlass ebire1, oddticnl attrbutes
oderived class becl are licod f} korm
h base tlass bel.
nt matn )

Peniveed l
ese
d/iret slicuiy tabe poce
a)Delefrnq derived(lass olf'-ct
a g
peviat end base tlass e has hos
non7 virtua desrucfor s u e l y nendejinar
b av Dwr
Mab ase cla s destreactor Vivlual
a a n fees lha obrd do ivnd
la Ss Aestvethed pepar

1o) Associa lier: usd nedatin no elnme and


no Ownen shif
4gnegolion Connection wnership, no stinre
eport an eat enl Enploses

.tie
(cnnpositier lonn etTijon DuneAsbif elire.
t Can

You might also like