0% found this document useful (0 votes)
70 views24 pages

1st Chapter OOP

Gft

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)
70 views24 pages

1st Chapter OOP

Gft

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/ 24
Funclanuentats peck onthe proghernyning A, rataucterd! pogromring | procedure oiiented ne Zammin > Help tn cAttins moderately _»Foewus t% mone ‘pred (font tend hol on data — > Not suiloble for eel Nn ) prone, for -moau b t 2)not cou bo gba s)not acwuable comcepls [ frotures : ce Cit, Tava Pgiagene : Ql objeck oatenked paradt qe v dato centaic vTie, doko wl Eo ferneh tora (metiedls). v Detompose progam ete Tote objects. Obfect iented oroci gC ae pl oodles { 5 objtcts Kay a3 ie Soin ol to i Inco ’ Features of mh Pay oan! Poteet on ool bly ') fe _ 14 on “lol oe pay are dtvided into objee-bx pate abaceetuser chorackertee the objecks, at A) Methods One fecl bo cota. © Data ts hidllen. @) Theecuiect communication wing menage askin wale ¢ “d i New data and anethods com be addled 8) Foltows bottom up approach (qeeualisotion) 4 a Bs: my objects: objeck » ane baie arm-Hnw entitie. 4 <= peason, COr> bonk accom , veckoa, List (qhysteal OL concep tuol), x Obieck takes space in the ere + obtcls interact by. fe menage a An tratonte qo ass, costomes tla Source bodies eae x Dato type bo , variables x Clos tare A objets, class: foie q oe 4 aintla kind clom t (ue4rint ev 4 * ik ae ny ar ce ila a object us prystet | COMBLEM ES Apare tr bhe ment fy iin ~— " clo, objects 4 a, Repaaeete ation Emplor ek 4H dhect nome | LOMe pbaste amied doto was: orp al () compute— tox) method gy Paramabalaowbior Encapsulation 5 Mrappir ae Os : toto. eg Insulation ¢ dota trom ddeck actos. up 7 dato and mebhods Dato ancl methools | (yfoamation a breopauloction Block box: Poe ot obstrottion; entin. PR ry, nical feobuaer ie clue tga detoilk or cxplane ton i x obieel ¢ ont clow oceint Lhe propatia on bthe. clow y 1 ‘ P t +tHaorchtal clautleation ee the ideo 4 rasa al Ihopaty pn a bind | Atlaibu ies 5 Fea theu ong a a Bad | Attxibut ors Robin Susoltou er u;| Attatbuter; | Ability to toke more than omecfoam fa: An opuottow edubtting olf keenk behoaviow in didatnl ins tariees , ‘Shope 5 lameks is extn, regitker 5 41 tut arw not Acepporte iw Sova, qr hy ¢) Jove donot support for explicit pointe tape - <) Tova dounot lege. Prcen processor. y+ debine, 4h include ore mot supported te Jewa. 8) Tava addy la new obrokors trskoonce and SSS (coutgned night shift) 4) In C+ sont (void) yin Jowo- fumnbiori () . ©) Towor adds tabeled ul) avo adds lise otentotion. Jawa ond cH: 4) Tow doernok support )Tovo. dounot have template vclames Get, c++ but hos genni 3) Jove dourok « 4) the toubvalenk ¢ batok and continue, feokures Acoprtred fo object: apecotor ovedwading : ve multiple inheritance. my Interpoce?, oe i but f ot av of , Se h) No lobat voatable tr Java.” x) CH destauctor = Joyo finalize ©) 6) No header fates trTove.,, er yb supa seb d (<)) + Jovo_ ta metther - rf auposck of C+ Ror Tovar Enviaenment - * Tove env dorement inclerder ; : *) Tove. development kik (TDW — closes and methods) x — Java development bool Tove stamdord Libro Gs [arr Applicat on program min fakeaf oe —closy, methods , inberfacer, +) Too. Bete Cen (TRE) 7) Jooromdeanboprantiletie Cotten d tools for developt Avonnis jOvo_ Rr . oppleevierot.. » jovoc * jovoW . jovo-p + fovoh 2 javadoc - Sdb na Toe and roppletvtero — bo aum applets ToL B Davcoser ai pork a | a) JoNO.c = java, dotrce code > java comptlea a. fova. byte code | or table). Cirtermed tote a 9) ™ Tl orm. ae Te eae we repo dons | avyova. —inlepacke byte code. ( troitate “bute: code, to ‘machine level code amd bbo execute) umble . files fon wed with Hp Javon ~ Jove. sot ro deuce header s) jovo h a oven ve methods. 10 G) javo.doc - bo create him formal document hy pu eo moakup Akg “ORS thom jovo. Sout +) db - Jove. debugge br find ewers Tin ur y Yao oar ae ‘ Text eclitor ' £ Tava scuacd pogam | jovae [Tava clan Hite | (Gy te code) Fer Surnal class d wethods qusuy oO pack a. al ios F ] to « ‘suppoab ackag Crethods thot ficial iat 4, ao , > jave_-lom. 2) Ubuty package — uttttty fumekiorn suk ou palace 3) Thpuk [output pal t- bt Am fmepue oukpuk bee ee 4) Nebosork pl oy ean computer com ~cotion via tuhuyek. s) Applet ackoge — closer that alto ocote a a EE applet ua jova whic Cane oa F and entecerked with the he Lp g of well bavener , bi dealt applets are safe tr we because the donot have Gece boither Weal [piles Towasaumbtuesenvworment + Factlitotes the execution 4 Tava. “room. ee eee aes) [javo. Fova. clasx ttle Mpgie ead) > (akapubal > Cage taomulokes ¢ emecites nae Byt te code + TVM —> pepe (Tower poakable) Machine 1 (TWH )—> out pu Bute cde + Machine 2 (TvVM2}—> out put Machine 3 (tym) guk pub - | 2) untae class Dib — closses that ie iw oxecution dy Tava, pope 3) Use. tntoface tool kts; Eg ip AW) etbstadclt vinta ! au Sy a cacating graphical user bape al | +) Deploy rene techtitoyres | a) Tava plugix > applet exe uw ) tava. web stort hori Nn eployrnent cn Tova app plications: Has tig be cil browser. AR tool Kee webb d ounlooded q omy 5 Stwiple Tavo- choy” Boctnple i A { public acetic. votd reoin( ateving. all) { suptem “ou. paint (9 Tr I ma irs pogrom Oy { 5 [clara|—-eapoord les “claw nore start with uppe case alphabet ‘ tj oping eclost byaces to enclose bedy na, ] Hurd List pas quacm con “have amnuttiple clang } = ee clom should bave > the wath rme — Hole sal Woe ce pont for eceru ton dada car a We|- a eles Le ckhod Combe’ ee cy er Cee ocplal lokie]- word , Ksbotic mewber G clors d at o clase Level en oeotn erating om jek thas clog. U + Sample, maint! & ome! oe os cloy metho] {(wrewbesr 4 class) of Yume - atatte cam be data anon mekhods ’ t (voted smethod -mabi desma rebuam to volue. greed : am ar TAH obiccbs, Une, Tova a class which Ate Hark arguments Posed to rman method | Gleroat pentlin (this Wray first Tov pra method belmg fe eee obfent: | Skakte member 4 Austen clay: v | Rutlttr Tove clom be oa ba of Seen, Ai pplication wilh dive classes : | clas Room 5 f float i} doko member £ teak ae Wl doko. rnember 2 void -gekdota (float ts featk) Il amekhird Length = 5 ! leodth ~b} 5 5 | closs RoomAneoe Oe | { public state! void main (String. cergr CI) J s fl , Vii Wook oreo) © O° Room AL = Nevo Room(s AU getdate (10.0) no) 4 i Ore C= jy. Len th # Ay: breadth) 5 y Syste Oeil punt le (* hnead” +area); DY No fe getdate. (Float 4 float b) length = 13 1 Fleas float qxboneal) actuan length x breadty 5 5 Clox Ropmkneo 1 public itatte! void main (String oagl) i } Mak aren) reed sap) (p we =neo Room); Monat ‘1 aaa (w: Olp Sq) b, ae ) bh sed log)} Avent AL bee oy ane Joo Pat ob lap htoy Sipkem purklrn( Area oa ae 12 Hibdoid on : 00 dp Joa Float : hee Float fen uy AIUL repo A : void Pee oat) { Length =; oorArnroad spl bedi. ='5 % { o ie hednw Poy othods 2 we we gional) » 1 paA9 lo \ agonal pte (Hens ca I bla) 3 ile # <(02,0.0)) = ahabdiped ea Akotic void eri mai | “pool onze; oe be : Room AL =e Room); ( aL .get-data(to.o, 6.8) J ‘er getorro() 5 ae cad, casen a \ toat yahis0 toa ieoba th a 68) void i sit pe j Os TH By Oo | ie bredtlth= bs oe 4 } rU0 4 wor float Loreal) . Hons doaly en Jenghocbrcoclth; Hoon }oa)4 ow}. J oa} ) odob4p bfov 5 | Class ReomMnco. ae § public skatic void moin(sting “yi ahs orcol, Prra2; fom ni # ees Ravin} Rovm A2= new Room(); AL: a (to. OS 0); Wee (20.0, 60); : aL O2AN- (CO ate ek ee ; i bem.ouk brent sfaaa1 2 eae —_ syskum. out. pathy “Anco 2="+0rc02); SJ Savors noqvonrresataictvere, poctrmentation 4ectlors , 2) as package statements 1 (r. © inaport statements inketace statements clay ceenttions clo) WAL sath method! 2 SF () { -mach vmnethod dcbinttons Meuliline ee ees le Lene corrernent || i puveboabtow conimets Ire oe clos frme & wocme Tw ae, aukon a hare, can be be | z og Akoskae ne we favo" hed epntnions Won el ey & wt mi fee 4 aie 4 ¢uol Wwe eae te Ow NBEO Faydond ea fiwol wosabid be Gs ‘ c re pre toe . boith a Vea: ese caltadotbi bycoule be lal ©) ’) a "Rs decktow ‘we Bw | omerctial tor All Yowo proecconnn io fi A moree sh ee oy) a Teaepeaboone, & sional ike joo sr Orn | | ht jugle Hi iw} oration , Irate gest rl ounthirn! ) « ometiel i kon | Oe we ee te Wea Alea te docarhikigtoi om 0f) zeckiow, ) 4 Je] To docierneat he pUcr Foxe Gh the oa Ae Rian Solan } Cio Y Tuspont & wed od epee Tee. as pre MIs] Y Cacotin’ Type the pro e an ie rim Jape, Sore th with the wtenton “avo Test .4 j [NOTE] IF we po a nef save the! pro iG - choke han jhabn idimidth eae lam hoxing smatn. aoe om ep 3) tLing: the room, Rovmbaens'jova Javoc Ropmhaca.javo., Eq cto (jwa. Corel Rovm- b peepee oT Jal Ree Clow ‘Rov Areas pub aka. ve mang { 1 SEerabng ‘tre WE JOx0_ Roomkrea (Note) Hae accom areal Room Roomineo clos (clo fie ats i 4 5 % Tova + ther pr tonm code calted byte code) favo a Linens} by : e Compile cat ane on thkanedtate code. Cyvtruot ~machin x byte code (Tyre 1] object (TyHa}-— machine ee a, nce tbat 3 object code, fnterpreker (feat machines) on virtual emochine cata aa) eld de — { | Fave. oa ; ] compte. { inka preter APL hag Hak ove, Auupplicd, bo He program, on Le o tnvoky it fon execubton. al jova tet ce c++ Taye x 4 fOr ‘ bo be Bite certain Line onguaents ag, ( 0) =< Cc A tty 2 01.95 [1] a—Cth CLAA onga(2] ~J; => sbieng LARUE, L x fagurrent a fs AULA pro») bie 8 os ia b<3 = Fobe ogra ends L Louw of dleyrountc binding clay Aniwolf Y void eat 4 SOPC Arial 1 Py y don ra Rudswad { sor * Deg ts cot! me srodte void vob ang/ld} seal a= new PD | o..cot(); ay output: beg 0: eobing 74 cu nclanentats 1) atauckerd OG" -: crm ge oe ae ms peederxalt t “object oALented dork d pe RDgf h OETFEME pergrocm iA sa t reed ik Amal ports dévid rolled jurstions ports mi wt &) Ik fotlows top’ 2) It fotlow- | Blown. approach bottom LP approach, No aecess 3) access Apectpios : peckefenn ave aay Wel aw r) adding he 4) addi nevo-datn | dota cond fucnetion- ie " chon iM snot C04 i) dounob povide = Leo de Hain. hl Ao ie hid ee Los Acemae (h mec UAL Jovealpading i — ¢) overt ead: nik: vost ue a Vv DoDI Pos Viera Tr pTo rer G Ve Obfect On 4 ee he Te ir upd 4 Ss boty dato \ It & boxed om toneol world 8)tunction & moe. tempor tornt than doto ta: C, bo ator) poscol )Lasic ayIt % bored on ncal world 3 8) dato mone B {wepoatank thon function. cat > Jove, Oe d qytor cH

You might also like