You are on page 1of 38
2LCLC1OLT ~ OBJECT ORIENTED DEgiGn AND PROGRAMMING ONIT -~2 — INTRODBVETION TO OOPS Objeck Orienbock P. grammeng! 2 g- Encapsulation 4 Mes broston 7 Poly monphiam Dr hert Eante ae Dye Mie Binchirg e Message Passing. 1). Clow une defined da Member dpunitions >. objuk oye kot & an talent fable ertilg uth Aome Rosotesie and — behavtor , bof Gd an tube Aa class & when a claw te defined, no Memory & allocated! bub wken OWjet cubantiated , Memory te Alocatacl, Encapsutation Wrapping up data. Singte une , Binclog bogethea He alata and Me fostions . aud — -ttformation under a Abekaskon Provides only enenrtial — uiformaten abou Re. data fo the oubstale woud , Racing Be dabotl: o¢ implementalton, uatog chaser Heades File. background th) Abstrastion Ci) Abs tratkion In Polymoephee™ % ML of a menage fo be dizployed 6 morse than one fer. + An operation tay erhibit depporent — behawier ¢ in iforent — -ausbantee. CD Operator Oruloactang CW Funetton Oreboading 6. Pnhert bane the 6 be le ly a law be durive propustien and chararkercglie fom another clas & Called. woke barroe . Rew abi te le Ne ae auaing He fitele aud mefRodk of Re eneatung class . CH Single Pp hewtance CD) Mutter So hectance tii) MtwLeeple Poe bante CY Hierarchical Tn hatbonte ( Hypaacd Bn how bance Dynami Bindung the eode ib be erecubeol eu Araponse 6 He pometion tat & decided ab Aum Hime, Mewage — Pameng Objet communtente wih One another be bonding aural Asseiving siformation, 2} -tuvotues oe. He name of fre objet, Pruution name tufor reatron to be gout, Feat wr of oH Enhancement of “o’ Panguage Ho sielucle an Objet — Oatentacl poradiger 3h si an senparcline anh complet dangniege. Dhjut Oatenteol Programming Maths ne Srclaperralast- Simple Hyp foek fonguege Popubas Coste ons tive Compiles Basool Dynamie Mameot Ablocabion Meron Monoge reart Multi~ Paserdang, Makthe — Indepenolent Code Hat ean ren on — binue / winclows / mac On whit make He ott arhine Bndapenclant bub the erecutable fie of Ha Ott cannot Arua on Afferent Operating Spel $ mph? kt Can be broken down thls agreed (ON a * Pr Ros dibrany Support aud has voniely of alata ype: >» bigh Ave bevel fan oe e ot closely aquouated with Auman dorm pachemitlc. Eogtad Longucge & Poputor | & Suppor= oops: 6. Case- Sern tive Sa b Care Some live preg Language 1 Compile pared, + Gompted and Hair executable fl Used to Aun fRem, Varriobles Ose allocated He dynanet coop spate. ek Pride oe furtion Fhe Vordadlen Ae Atlocated 1% clark Spare. 4 Memory. Management & cap allowe us We allocate dhe memory of 2 Vvartable Or an orrad iy run Hrme. i Muh aaadig » ph ba speetaltanal form of rutti toby . * Te bo feakrre that altos yous ages b&b fea etekies Oem poem toneasaenrity , flo eperabions * fy crt, eapek and oulpub ae performed 1% re form of a Angst of by lie or more Commonly known as Lbeearn, Ir Dopuk dream | Tp He ciation gf flows of byt from “He oltwiee te main memory 2 — Oubput cheam : Pf Ma diaubbn af glow of bya ik from Mata memory te davtee. Hen He prows Gg called oukput » [. a. 3 4. etn cout rusgtonsd on Heacka files feghreatm ! iomanip : fsbes = bur | std cH f ctanolard input — oulput haan, thir Reader file. conbavne difiatitions a obyats Like ttn, couk » Cerr, ate, Pnput — Outpot ynaniputalots . phi file con taunt A finttions 4 gebw , gebpeeriaion, Dh rmauindy olucrtbes He fie giream , Pr ok uted & Randle, He olata being Bead frm a fie Qs thpub or data 2 written nls We fie ae output . PR err hercler wer Slanclarol Ubrony, x wielude. ZioabreamS uk mau 0) } char sampler > " cuelcome ” + Cut << Sample veburn o | AH snelude < toahrearm dune mais C) i side age; couk {6 " Fol you age! : din >> age} couk << “Your age a: * Kgage cobuen 0 } 4 fe wirclude < CoghreamS ink mau C) 2 Corr £2" An error ocumed” ; reburno } c++ Dela Type a vy Data lypes speet4y Me Bice. andl defps of Values do be dbored- CD Pairmasy J puitt- 20 | fundamental data bre Ui) Derived Dota Tyee tit) Oger defi naol alata “Types Puree v wb Derived oo 1 Integer (tnt) 7 ee et 4 by t. fon Cherrasbet. ferme) 1 1 class 8. Boolean ue eae oe ie (floab B. Poinlia a. Unoo 4 byl 5 Double Ploak : Rafawnnee. 4. Foun ( double) | ge byte: ; eae # vieluda. < tagtraams ink mama (> 4 touk <6 "dian of ther! " ce sizeof. (chow) ‘De fintHeo . Llake vortable ee ee % Dectaed wring Ror been created at Ha shart of Me and —dleatreyed — aushomabicalty de, clan Var'aBles, tha Kuyword "gable ” * Tk pram than eeuultcn exeution la x gntHalézalien is not mandatory , Defaute Value & 0. Comstan le & Variable ui th ‘fixed valuee — Cannot be Changed | « Ontng " Gonat” buy word . & Read only To kang 54 ntax Gonsk DalaType — Vartabla_name = Value * Comt ine vari = 5: Bx fre ant — mas 09 ant Vor slo! foot ink cone = 20) Gout dg" pavhal Value” J cout << “Var: ” Lk Vere fowt wh (i¢t ) 5 Couk £6" Hatta Word \n” ¢ tea 4 wetno, Y Do- while boop % Bo WH toncké How G beetod ab Ma erd op He Loop body, ORE le. - entoy fen brollad Hoop. Syntant ee Vv Lutholiaation opr 5 2) Y Chaba wende updele expr + 4 white (best expr) Fx: vt mau 6) i wut isos ao Cout eg "Melle Wort \r” ; tyes 4 while Liga); Tetuan o 4 Susi ted 9 k pt te weal uke we want t 4olb one code block out of mmuttiple blocks, Unk mau 0) ? suk jmpat > cout ¢<" Enta a no haber Ito 4” etn SS input | Suite Cinpot) i coue £ 3 cout <¢ "}. OnE "<¢ ends break 3 Case 22 out Cg “a, two” Kgandts break ; Case B 1 Coubkdg "a-tHree ” dCendl) break } Aaportt 2 cows << “Beeavur ” KC endt + a dwt mou 0 § for (int Lory Ugerorite) 4 Pe ttss 4) Continua \, era ge aa A Ourpat ! (oo 2 > ee et tS Assoys. k An array a data ¢hustune that & used lo Shore muttiple value of miler data lbype a conbiguous mamorit Locale - Array [2] [4] Te] [2 ae a 5B & pray Inderet- 22 - an anray tan be atusedl wating Hele uclices « Me Opt. a ancy B dalarcol Ur Siko Armouing lo ns bout Hrroughout he program. % An arvag con Rave — rasiltiple dimsnit'ons . ¥ the ho. clewenl Gn aa aay cau be Atumi ned wang Be Atase} operalir « Ne cam find Me tise oh He tre of Grove Yn ou onrray by “ee batig adjutant addause - Areas Bactaralicu a) Gyotar ! data lyre Array Nase Joie ¥ Array) pet Ia Arrayt [5] y unl wrayt £57) = 42,3, 4,54 5 and: Prray IC] = Gurarae Shy ge wieludk wstng hanes pate Atd +, ent ma 0) } we avr 3d 5 arrfLo} =! 4} arr Sy = 90% arr Po] = 30. cout ae couk <<" Giae of awn tal s " €C Sizeof (arrte), )s couk << " efae of arr! 1" <6 siseot Carr) ; Si de of Corr) / Siaae4 (oer p03): cook KC * Langit of am onray s” gon : wetian oF dank on = Claes and Objele #& claw — user defpnod data lope. , URiD pote the wh data mombera and member fuutions , R olan ff a Jehe bluspreob- for an objeel Deginang clase anal Destonuay — Sifell claw clauname Ateers Spec piar 5 ata Membars ! 2 Member Punchions() ! 3 x wucluds < dagheam. AS chou Ltuolent f pubue ! shiog Name » Void pacokName () 5 Couk {<< " Gtudent Noume w ; Con uy ee AW macu () } Student gti 5 bl: Mee Na Abe 2 Gt. PadnbName ¢) 5 trekvan of _Y 24 Outside. clo olefinition ! Vor d Stuckab 2 2 paintName ce) ) douk {<" atudunt Nowe ip" 20 Name | ¥ Cons beds Spe al class momberr which are Collec by the Conups ley evey time au objet of Hal claw & thntanbiabod * Conskeuslot, Rove Me tame name as Me claw oud may be olep ned wustde Joutstole the dase olefinition . ch Dafoult conhuelors CH) Parvameberi and Conahuslers - cit) Copy ons brusclers - claw Gdent public = ut td > Student ¢) } Gout ¢¢ " Default Brbrurlsr = 4 ras Sle Clu deol (ant x) } Couk <¢ "pora metas and Cons brute r a fd = u, i oe uu mar 6) ? Lhudient 84; Gout {L" Otedent id @ "gee. cd 3 LludemE 90. (20); cour Co" dudent id ie 2 "SK @o.td wervsan Of 4 Dehuors & OF k anokher Apertal prrrber. fumtion @ Called by Fhe. Compr lax uThen He Scope of objeb ends. 26 Abe fr outton eophe concept 4 abshart'on only © hows reuscty Hiformatioh to Ho use. PF feoluces He dom plat lp op tte. pgm by hadlerg He wiaplemantation Complnthee © programs. claw — gummatton § patvale ; ant a,b, a: public : void 4um ( snk «, wok y) j Ano Seg Cee ions 7 Coun CGieae ae can be acuuedd and monipulatad & the Hin Vout able only by using Ha mabrode get CD g gekC) Bat an pa Cau say that, Meo we ent est Rd fa claws '- Vatetle (ae aud Ae pratbrode qc) a atc) Reve bincd fogathar CBD Eheapedator Oi fheroute : Aeerastion pees Prous ] method of fontasn We ufr, gaining be taformali on at Droplanenbokico robes ae solved af Aavels tRe. dhsbgr | -ulisfore Love} Ride We dota th Hidung He taf: a Singhs ently te protect. elma anes Lem phmeatoal uatog clau avd dul face. : by Aes Mockfiare. 24 Aco Speerpfers ke Acces Mocks fiers sed f artigo He ie public cy patvadé a. fe public Al He claw members witli be auettable. Le ada spigior or Arcus Speuiffene td a eat ote Acemibi lity the Claw mambens- protastad . daslored under Me. public claw uvele j pablic ! double RAcobiee 5 cloubl. compuleA cea 0) } auturn Sh RRER SY _ 5) inv man 0) Civela C1 C1. R =5-5 loeb C0" padéus ue ! He i Fe) Coot agen & 2 KK 21 comprb Ansacy. Yepurn Oo & the claw mombene deolated as puvalz can cS Aeeued ony by Phe Member sfeunations tide. te class. ~ Only He Member cfumtions or bre. friend fomtions Are allowed to aus He private data member. of te clas. Chas bivele private Ee double R ; peblic + doube G dlouble, compute Axeal) wack Ue Ty Actuan 3th # R¥R) double area = diva & y : y Baty wees Unkle man C) Give cry Ue doripile, Ervor Gok ates Gout Lf paca & 1 "Ce Cy, computimen 0) + Arkuan Oy sa Onigrel Modelung Language (ome) Oragname eT Lo Me — be obfing a Loud arf & Nok @ prgvammeng fomguoge ~ Visual fanguage. ONL diagrams = portrouy Ha hebanuior g ChenLiiia, or a agplato. e[4 Engines, buineaman cual Aypslem * n Db Relps ouchit l= — wtih rmoolaling , daign ound analyst Use Core Diograras PE Repaesenle He Anteration between aleve under lonsdoratron Ao aceormpleieds ound sys lem Epuific qe Notohers Actor USE CASE System Boonary Adbs : Eatenol entities Hat tuterout ust Rha 2gelem. They cour iclucle Users, Olhor Syslrrn or Aju dusius. Actors Lnitiat- Use Cake, anol verve We outwomay. Use Gaur : Like ones In Ae play thay ae 32 Spesific Medags fo Agalave Gan do. Ex: Online Shopping Ags : Use corer | plaw Onda Trok olebi rosy Ackors : User , Delivery petra. Use Case diogram Relate nships s DE plays a crucial rok 4% cep icking Hae uuterastron bebweer arora aud usecases. WD Asgodatutn Relatrenehep + Hine coonasting Fre Qulor b Ha wsecase. 2 CED Custormey (D Trchude PuloliormRip: A wie cose isclucles He tumsbronali ly of another ue cue. Cdarhred ansour pointing from Ha darling Usecose, & Ha tacludad bse cove), Ex! Sciat Medio Pashking ‘ GH 2095) as fi) Beckencl Relalions hap eo oe lato tok @ use cose Cam be entendaol by cote, use cose tndin. Apealbie Condi Hone. Jesh crrour wilh Ra Kigword "omtend ” ), px: Flight Bookung Syslin (‘Book IY Kenteud> @ — Generaliaalecn Relatringhp kK 7b establishes an "Ga connukion babes tun use caret CAN arrow poin tung Aor Pee Spuickiand wie cose 40 Ra ques use cone). I (Rot x) Rand Bike) xed rating alleen Li i Tht hy Acdors 2 Dderchify Use cases &. Connerk Actors G Une cases 4. Add Spt Boundary 5 ine Retabfons ips 6 Review aud Refine ot Validate Sy waLshs bwiddoHs = aNMNO claw Diagsar 2 Jk visually Aspe of gee Ayslem . candi Whe -shrunlios anol Aatadtone hyis Notation & PF ba graphical fapnes cs aud hele yelaibwinahspe antolicn Wed ( dapub in Objask Oriented +o} (2! void 4 hop: veld Opxralions 4} Avived >: vod c ce Retationske ps WD Apsoctalon ¥ RF widicolG Mob suubance 4 one Chas are connated to unribauer 4 anothes claw. ¢ ———) cc pleats aa Seok Ci) Derobed Apoviahen kb Aeprmonte @ Aclationship Lbtuccn tio elaweg urkue He auoualion Aor a Aldon, ——————- Se EY Feachix} ——> [esr] qi Aggneg alse 2h eG Apedali aaah foro asotolisn Hal Sepeoente a “urhol. — part“ Aabodcorkys. - [Gompary}o——[ Employ] we : whko pat D4 the Company ceases to oneish, We emaployoss Cou HU eniat dele peudunlty . WY Componi leo k Shroog fer a aggeegaline , adicalng QA moan Siprttcant curtenship or dependanty Actalssnehip. ‘<< Cootak Book & deleted oF deshroped , all 24 He contort book & contaut entries axe. alo Aerovadl. wv amouotad WY Gronvatiantiso Adlationshp — batusean classes, ee sepresenle "Ba" Whe ena cla exh Ho Prperties ane behoustors of anokur class. = 37 [Bank Acsounl) \ oc _ 1 | ca) [en] [eractat Ace: wy Realiaaker « gh sdicals Mat a clous incplemnenbi the. peoliias c wu len foe - of aun ules fox Ee: See ——

You might also like