0% found this document useful (0 votes)
6 views8 pages

Sample Note Oopm

The document discusses programming paradigms, specifically focusing on Procedure-Oriented Programming (POP) and Object-Oriented Programming (OOP). It highlights key concepts such as procedures, encapsulation, inheritance, and polymorphism, comparing the two paradigms in terms of design approach and data handling. Additionally, it touches on the properties of aggregation and the nature of strings in programming languages like Java.

Uploaded by

eqbal84756
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)
6 views8 pages

Sample Note Oopm

The document discusses programming paradigms, specifically focusing on Procedure-Oriented Programming (POP) and Object-Oriented Programming (OOP). It highlights key concepts such as procedures, encapsulation, inheritance, and polymorphism, comparing the two paradigms in terms of design approach and data handling. Additionally, it touches on the properties of aggregation and the nature of strings in programming languages like Java.

Uploaded by

eqbal84756
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/ 8
@0i2S = ccr Asha Ku een! Prepramming Lang uage fr | med Objet onended Ph granning Phognamming | CPop) aaa. Ops . : proce Ontented Phepaino ng (pop) in PoP layen Programs ane dividecl indo smaller Phagrams. " ( pnocedure) -— In Pop q Phogham is Wwitlen as w& Separdte Sequence of, Phocedubes (functions ) ~ Each phocedure corlains Q Seniec of inshwuehons fo performing a specific task Duning the Phogham execution —eaclv procedure, con be called = by = the othen— pphrocedure | - To call Phocedure ,we have to Wonite procedure name — only - The mayjors emphasis of these Janguape. iS iore the phocedune and pot oon the ~ data a Psp language allow the dala to move freely ahound the system . - In Oop dala 1s hidden C secure) and. cannct be accessed — by ternal Sanctions ~ In OoP , objects othe through functions , ie ly, | Ole emphasis is thaw — phoce dunes . - OOP follewe — betlom comm tinicade — cwith each on data Sather up Phegham design approach . ee Fan [ fan) [nn ) bec-3 Difference ‘between — POP & Oop Procedune Onientec pregrarnming D cn POP , presen is divided] In OOP, into smaller, phayham< called Pie -@t Folloux top dow Program design appheoch @ Impotutance given to cticthm s Cphocedunec) bother in dota . Object otuented Praag phcgfam is divided Into smaller entties called objects . @H folbws betlem up Phage design apphauh @ Importance given clade. gather than algohithms Cfanchions [ phocedube. ) ‘© @® Dake Hicling | Information Hiding. ~The information ofthe dada Sham — cluvect atecess the. oudsicle function /prognam is called! date. Hirliog . We hide the clade Sov, securily of dota, ~ dn CH we achieve lade —hicling by using Phivede. Access Specifier , @ Pate Encapsulation - The trapping up of dada. and funchions inte single unit Ccalled class) js known as Encapsuledion , ‘ = In. CH Encapsulation, can be achieved by Using class . By clata encapstuation , dada ts not accesible to the outside clase , on| those funclis «= Which, «ane cahapped in the class can access itt. Functions of the class phovide the intesteuce behivecn the object s daly and cudside- obj eds — [4unctions , i XeL, _ pnotected accessed of base class Net) void sumQ int zs ZEKtN, cout <<" Result = "<< Z 43; Noid main () t clnsch 0; Derived D; p. cetxy (512), De sum C5 getch 0} ere MULTIPLE INHERITANCE — Tn Multiple Gphonifance , there 1s multiple and siggle denived class , bace classes Exampl aka include < iostnearnh? eE include. < conioh > class Base L protected : pull int x5 ic. void sex Cnt $) ix-n 2 yO! “Ambigui in Single. Tnheniteihte class Base 4 public» “void display () £ cou <<" Base. display ay k $ class Dexivecl » public Base { public. * Void display 0 i cout <<" Derived display ae sh: void pain() { clserQ); dewed D; D+ displ O gah 3 Method [ Rinction ovennidins a a Redefinition of base Clacs function in Cenived class. is Called as Sanction overriding. - having two o% mohe function with the. siamo" naive 20 ssignatune but with different implementation (code) - Dynamic ow Runtime polymorphism is also known as method ovenidi' which) call to tno an oVvernidden Sunchonw is nesehved, curing quirlime , not ab the compile je, statements , the hecwsion ‘terminates Lit simple Statements —Hene blocks can be nested fo anbitany lengHy Phogqnam (Poe | " r Blok S A adr Propertiey oF — Aagneqation Falssigg ane the properties FF Bianegation: e oO Thansttivify — af A is apart of Bond Bic a port of C_ then A is also pant of @ Phegnan if A—3B &- Feye is @ pont of fF B3C bedy of face and face js then ADC peat oF bey then eye is also pant body, (2 ati Symmelyy — cn this phoporby if A is pant of Bo & Bis not part of A therv Arty ome Oceuns | Ex: - DP wheel is part of Gr lou ar is not part of wheel , a SDSS Strnilanity - We cannot cheate objects of bothy intenface and abstnact class bug we COP cneale freSnence of both of them, STRINGS. “a Sti i is a Sequence of Ghanacters (aprabels, humbex, § th, - ek.) bat cd is not a Primitive of builk in type, ~ When we cneate String in java, achioly —Cheattes any oe adh ype > Sting is tmmudaHe otyecl when ushecy means ‘that cannot be changed once. it is cheated Whenever we change n thin ,@ he instance. uy atc u is Chi String = "ht" x Sting Me "ht" 5 ’ a L= x concate ("dean"), [ride] ~ Jaa phovides the. String clase to cheate. and — mantpulod, String. — String Iso Final class, we cannot extend — To make. the function ality of sti class secure (f is made as final, Ai on ee — object ds hams can be ‘gee as ipe snapshot or runnlpy posrticulon moment? Ce customer Olt. ohded @ SI % specialond, Number = 20 object diagram of onder Manggerené Sy - beds customen ( 6) S obj onder Ca, 02) 03) ° special onden( si, s2) r a Nonmal onden(No) , sl a A Customer Name’ | nity Jocattien' String onder date: onder Supenclass. number-stnin) E——— send onden() heceiv eonden() contin) ase Nohmal ondeh date: Duke number: String cations] sy, 1

You might also like