Professional Documents
Culture Documents
Oop - 3
Oop - 3
lnnm¥m#
pa① [ money ]
human
(
traits valves
,
ti
h°
child Ian is
inheriting properties
b- ↳
pm
to
m
wei④
?⃝
Basely
class Chid extends chided child
-
neuchildb
→
/
child l
weight;
.
int ,
wild .u
g
,
.→
mid .
h
jnitilitge
class
parent
•€0→r
twm①
Hmm kept =
her t.mn/ 3 '
Kinley )
÷
'
d
weight
⑦
¥
Typesoyinhwitmmi
G) Single Inheritance : One less extends another class
F-
d
j
② multilevel Inheritance :
d
Bo×weig① .
&
Bo
③
MItiplelnheritaneei.ae
Clan extend } move them 1 clauses .
Not
Allowed in Zama .
⑥ willdrthi.ir#nterJaws)
h = 10
n = 5
Led
C obj =
now
C C );
c. n
✗ ? i. e. not in
java .
?⃝
④ "
i:%I.÷÷÷→ ↳ man . .
☒
% ?☐
⑤ flybridlnteritmni
Combination of single and
multiple inheritance .
Not in
java ,
ocean inter
fam Kuhne ) .
☒
F. I
③ ⑥
↳☒2
ADI
Pds
polymorphism
m
§ ways to
represent
s⑤~
"
f. a
weed )
Triangle sgw① h
TMphi
① compile Time
/ static Polymorphism .
Achieved via
d.
Same name but
thpn , argument,
return
types
,
EI-mvltiplewnstruitors.tt
a = new AC ) ;
A an =
new Al 3,4 );
②
Runtimeldynami c pol y morph.
by methodovenidiy
i s #Awhi e nvd
yµ
Parent obj = new child D;
]
Here , which method will be
called
depends on
Huw
a,
gunny .
gaming
~
works .
HwJannthisDynamicmethod② dispatch
Encapsulations
i. Wrapping the
implementation of the data
up in items
members & methods a .
Abstraction :
Hiding unnecessary details & shrub
valuable information .
forindiph-check.videobwtes.tt