Class Inheritance (Subclasses), Super Keyword, Constructors (Under The Hood)
Class Inheritance (Subclasses), Super Keyword, Constructors (Under The Hood)
Date
ronsteuctoe(usefname.emoil)
this. dse¬name =UseEname_
ths. endil =emaílj
ogin) 1 CLthis.USEIname_helto)
Onsolefog
etuenthis
Class Admia_exhds
Usnone=AeWUses(tmgsio'hlo@múl.(om)
nst
fonst_sP1Tuo =ey_Usea("hetogood@gmail: (om)
onst r Tnee = Adnin('shqun,'shaun@gmail-(om )_
fon2ole.loqlUse Thiee)
(PagaNo.
Data T
gnait.1om"
Admin_fusunome : "shaun"tmail2"haun®
when_ye Cti
ie
and whm w_exkhd 4he_admin_
d n i R _qet folouing sesult
Parnauhangamaihlom"
USNameshadn"
-ppoto- Js4s_
Conate uctoE Class Adminh
V-pyoto
(Onsteucte class dseE
login _i loginc)
logaut f logout
-pöoto : Object
inhritance
hee haueUsed he_oLept of (luss
thot is vhy Pranple u-paw_y4t-4
TE Tt Tated admT ONd t adnin r0sS We hive
Gll nGtHhod5 Uses, Class hgve.
phch 0U5
HYe we have afed the admin cluss uhich exftnds
he V5e% class Ond. theefde e ge+ a Ptopeotes
Ond method5 nhI Tde ddmin tlass
Date
class Use
(Ons teuctoE (UStENgMe;email){_
this-useename »Useename
this emaileemgil
loginc)
On sote-log tthis.useanamej loged in)
expioAato
class AdniA Axtknds Js6
CACAgtion deleteUsreuseUsEsE){ filtte((u) =7 _ 0
USe Es =
etuen d.UseEogme_fezuset-useEname
d n Joginmthod
(a) [UseeE,AdminJ
(0[Admin
any hav a teto
ahe_now we
wh emoit and toat mthed
onG,
hete,we hove doltted 'useeOne
i.magio wi# tnail nd Nhod
Page No.
Oat
(onztEu(De.
pothoue_a_
sf this admin_class does ui oo-_to
inside it then automaticaly t
(l0ss that xHndsHndsEm dnd hen
it wil tal tat (onsttuctoe
wEitHh0s
ttke
h
OUE code
Date
ClassUseg
fonstfuctos (UsCgnome,maiU){
this.uiseengme = Uséenane
this. emate emaitj
Jogout(
(915ale.l0g$KKis-useEnamet logged out")_
etutn this
We
i d e
Supe E uStNme,emgi)
F We w het use this then we ill g
tollowinqtEOE.
Uncou ght Rtftemce E&£0E:Must (aIL Supet
on teuctoE In deeived ctdss befoge acoessinq
his 0tetuohing_fom deived_onste stuctog
Consteuctogs (undee the hood
( l a s s W t A t
intyodyted -
class Usees
(onsteuctot(usesn ame, Pnt) t h es u M e A L t P U t
fontuetoe
HK ntu-Pites
fot settingupyhe
Page No.
Date