[go: up one dir, main page]

0% found this document useful (0 votes)
58 views14 pages

1st Module 2nd Chapter OOP

Hhi

Uploaded by

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

1st Module 2nd Chapter OOP

Hhi

Uploaded by

Adnan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 14
tH 2 Chouges 5 objetts del Methods 4 Claas ; Defines popoctics | and behaviour a G objecks entiter . aty edato ( ) ref odin furnchiors | ie ‘ fie tore, Ae ee oot Tie 1 homuy ) functiovs av calted On ey adh kh & 5 9 eae OID A ‘Aclay & ateplate for, tne ae frome Mea Gad talents eed, NE peter lin adax; | tr = class € mecme/ extends a low’ [fields decloration ‘H JLT & optional & ; [methods deubaation ‘| {HET na apn te Sfce nome - Nome the class Pig extends — keywords to tebarit oelars | another clears, ny Suprclos., noame. 4 ae ne ee mr choy. marme(sub class futtd dectorotions Pas 4 dota munbus ol Conventions 5 x Claxsmeeme should aboot wit 0. De cate alphabet ' a Method name! Listed non fic Oe howe a3” alphalbel ro rnd. DP day) | iran . fede ane ot ae pal Ha body 42 clors debtwiion - Fidds are alse? Called’ as trite ncee) vortable pr, | ameniber vastobles pa_dota, variably. : fg closs Rectangle J ink | Ww; } int Wid tio ae deloro tion, 1 tnt Length width 5 : 5 “t Methods are Weems to mauiputote Eke, dale y contained ma clas, i re) J Methods? On deelored, tuside, the bedi « dy class tumediatel boa, fields declorattons.. 1494 pa z | @ Symtox : tts nto Goal wi)) ~ nell ad boda “Ud tear, type - Retuam pe ‘hy the ancthor hid Eq: ink, 4 0h, aD Ere anctho A method name>, Name 3 idlentihic). ; ul porcometir Lest - tuk @ paracrrelia. with 4 nite mame ond dato types. Paranclay acks a tnpul, the oa Bre method ik oe poronclas OAL Op as iq oteh 4 © —lordy.— AP 5 detarabive ‘and o Le neukable abgbrents Fay) int method (inka >tnkb) t aekuan arb; ( 5 ; | 2) votd method () bi ay dos 05 = b; , wk Act ftaeoC) tp ctuan’ Lengtixbreadths } oU % 2% 5 ie . Retina fyplicolion. ~ public stotic votd matn (abd : ig vb Oreo. = A nets : Augpem. out. line nf" Tien. oy the a avd one) O}p , 14 ten, a ier \ ; {aco o the festomigle aber ieee (gma) hee a xn Oveuy ment V i ale br create wrth some” nome. But Ail erect povecrneber Lik ond dilute dehinitiona( (nate) sat x Method rte lu acqutredl hun objecks oe cxpecked Er peiforrn Sefuilacr tasks but ee Hi difhoveul porouncl nd ] o ) etolun’ a wid od AG) Conbledls Tevaitwun kde ou are vueklsd Joed omy O noe ¢ n yin, & ys jonaineners: Hes 9 colle Lu wor pls, +The ae 4 a docinat jay ome anole Ww well tng ~ A a Actkocl overlodd | 1) Contador oveloadl \ 7 2) Ondinary rnethocl ov fi demontaote Gols olen \ Ye | I] Peo UT ae a Clos, Room 7 i : Flook Jengths lool vd ty ‘ Brown. (Horko.) \loonstaustor +) SE se Car Lengths bua! length = ee etm 5 Rown(Hoak a.» a [Peon baucor 2. Wrot 9; y ‘ th = 05 i - > 0 ‘ Pag Seah AGM nd). ont hood age Weel oY J ovol nw sop fs, : 1 rl n " a ta "I basian ‘ clay Room*acor u publie static void mamn sing oral J) ld Terai catied aes a eh Room ays neu Roorn (220. 043 30: -ok) 5 ee Room A2= me ea leet tana Wood re leeds Cpe a me On0 | onary y slow Seca. “ait fae "+aacal); sige. oak pint "ho <"r003)) sf Anco 1 = Gop.pooo0n 72 71. proaponll Anco 2= Avp.CovTTT \ an toe demonstrate, me pens overtoactin closs Oveal ae t 7 void test) || overloaded amekhod 4 L supter ou printle(" Method wrth. “nd pasarelt) void test Cink a) I[Povedoaldeeal nmekhod) ; (rteger 1 “ait panttn (Metro wibe om tegen, i system gut: pam n(? vonrmal jel 2 a { vid best (ink ‘a tt b)3 || | gvetloaded! 2 trbeger v d will Cay ri olen Pe va ‘and Pay a yrid test’ (double a) love agaded. hater " 7 | L “oul: Lin YMekod sostth one | / i ouk-prrnt ( sali ee i oie clos Overload a public skate void yy sate ona Ls ealeor Obie a bi -bat() si i|use 2 f ae hen llwos ma me obs - test C450); ues HS | onAelhe det ob test (15) 5 || wut vio olp ; Method with nove param ehers ‘ i \ ub) A=20 & Method tithe bu be MCUs “pox” ve Method with one double porameber a= 45.0 Mebhod withone ee ae C= Stakte: Members 5 i Se comnm. an wee el ' d the clax ond oro ascoved of te class level without wig a ae obfeck ) tyshonb ver » phakic tnt eokmbyllstatte, dat a ember] ee mn mo (hut a, inebyslf Abake (wethod 1) Static ventolle omd wmebhocds are abso ce a clay variobles andj meted. 2) Shaie” variables ore rented once a clans level & One shamed, ge ei. 3 Skotic meHocs com be brom ie name withouk me au ee ; ta: tlook 1 = Moth cpt ( (te. 0) } a wis dak bo Moth cls } ee ( Butte A) testarcliprs on wt atalic/amellools, a) A skate metWbol corn only other skate. ancthoob. b) Static mmekhods com access zeal co) hey cannot Adler bo Y buts’ or" i ie i ts" or NAaper? [Rogan to durrnitlote atoti members, clas; Math Operations : stole +toak mul (fae %) float 4) L Arkuam C743 } katie loot divide(floaka, ptsok) . ackuan as 5 Closs Mokhoperattonsbernp i public arabic void anoin (SAG rg (3) 5 Math Opsation « mul{ 2 ols 3 ob) tool abe Moth@pccakion » oes ae hg systems put prrakin( "4 Ges eat ; { Ftoak | aa ‘: ly (one gia calltug other \ De Led a ther K ey Loo A 4 6 class com be : attocl A the scene class 5, % knoton oF hy merktug qd met thos I] pogrtin to demowtaate + meting onekhody class ™ hte xing 5 \ tnt (m7) s Ru ins NG { ean fae! otk b) ° ) J } V mod) n= b;5 int Corgat () 5 VU (arn) Aekuan ™m> “Agkuam. 1) | a sE( \;. Ih Mes tect method call. hgek( \5 aie Pal ¢ Longest q oan + ‘and’. i it PB iM + NA Ue aes ¢ g { publitc akohic votd cron ( Stang ang4 s()) { © 1 5 | rim p Clos MesttvgDuno Nestin obl = eur Nesting (2 4 ie mn “a 1 ¢ abjeck caca ton ere aihialisabion ob1 WH [So_ | dip Be 2 a age LnagQi-C) a0) b) disp u 7 Jp: Lorgut dao ond Io f 30. eg i

You might also like