Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
15 views60 pages

OOPM Unit I

The document discusses various programming languages, focusing on C and C++, highlighting their features such as object-oriented programming, data abstraction, and dynamic binding. It emphasizes the benefits of object-oriented programming, including reusability, data hiding, and reduced complexity in problem-solving. Additionally, it touches on the historical development of C++ and its applications in software design and database management.

Uploaded by

armanansari0126
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)
15 views60 pages

OOPM Unit I

The document discusses various programming languages, focusing on C and C++, highlighting their features such as object-oriented programming, data abstraction, and dynamic binding. It emphasizes the benefits of object-oriented programming, including reusability, data hiding, and reduced complexity in problem-solving. Additionally, it touches on the historical development of C++ and its applications in software design and database management.

Uploaded by

armanansari0126
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/ 60
TTnbindluction te object” Onieriloch_thin king Quenview of 20 language ~C_language is noc as Shuckoe —onien led _ and —fuecesso- _aniea fed language 2 Ti _troplies Top doson _fuoguanaaing gbpiochen i a fh be _henformed All __suoguara code fa 0 language tan be exacted Cy Evaction _ouenloading and _ohertaifin Ouenlooding is _ {5)l| Locad wawiables tao be —declone only al the hegning of the block Proguara _corttials one_—thraugh jumps Gnd call “Io | wh novline (4) Polyphoxbhisma, it not ible Fox Solving lhe {0 blem. Te huablens is divided ints Che numben o€ modu/ea Aach modules fs _gub puogsamenin.¢ — ty | Date “absbioclion — foinpescl is hot Supported | by _puocesson __Oxtien. feot__poncessot _lanquage (a) [Data and _puocessan —onienlect language i — open ancl can be deceased hy ony function I x Ouenview oF C++ language uy “The Cee lanquage Con he Considered as an incuementéd ~ vensian of ~< long ge Which oll jfagtamening language toasty ok aith nevoly __dddled Fealuaes of oop (2) || Cer ig uuclione | puscessox onientod ond agp language. (3) “hecs+ file exlension crs lenguage is | Chp (4) | Hene function owen loading ano wali pve rhedina ane ho ible (s) Vanfables aa be decane in line het i dala__yiathea__“-han _paocessox. “Tn__C++ tang age -polyem hia = -encopaullian an ond jnhenitance _ane possi “ay Data excess ig _linniteol it Can be evce by | ede, , ; Z s io uv igibiltl dala ond memben function thenewhy huoviding dala unity by lal biddng — Uo) || Dynamic binding is __Subhostedl hy ¢+# languaze i “Cy | te also Subboils all Featines pf ¢_Innguas (a) | Te con be Inoven 08 aa__incnemental __wension —___ o€ _clanguare dé || Hishxy 0€ C++ J Te _is_develop by jaune tiovstuup fn 1229 at Bell labenalony af usA Th wa: aialy used fam designing —openalin ¢ —— sysléen designing vith’ hes "ss Obj feat Ohttorileot. “Pragytamaning oe ¢ fs Obje thas sed on _-the tomcepa of — obje dks _Onveatoal puto anor rain — | may ceatain dali. In the foun of Feed i fa th | meth TT hnesnla Ee —abjeok—aultaled pate gens D sinns fo __froplented meal sold —entftio [ie Elen Known as __absPbufes and code Fora _of __Ltoced uo: offen Knox ook Ag the name Suggest use ob/ that _ohenalans on -hem So that no _alhen Joan excepb that fun tion expec =e Proce sson Onfenttod> Parag ssocarainy o~ as a pstargat madet__ which fe _denived _Fuem _¢ 5 of cs _based do lhe _Conce pe cut ate sls 8 o | Dirfenence between [ oor yy x poe OOP 1 Pungua to diuid G taller tus | (ey) “Frapovilance =ta__data but - os well oS | 2 Se ( eis} | be done | data wiolhen than pioceds I houfiace is 9fven 15 on Funchion berause | sathes than tockae| wonks as a Heal : i because it nant : | words os a Sweat - il Teyete Fallows “top don |(2)00p —Follacs bottom —— : [ust does not have any | (nop has excess —a-sheufisa exce: pecibien name_public_ putuale ite [s\Data tan move Feely Fo10_| Cunclion th Fonchioa | (s) Obje ols re | communicate tat th each othea liiough —mecnbea — Foaclion new data a leTa_adal ———}—Funetian fn pop is | t nok shoo easy | éoThe _data— 00p_punuiden an easy way ti_add_ nese — and fioclon Most funclion veer re ta 0p dala Global date Con shaxing move easly fy fine. t6 Cunc. tk can be teat an he aceesed Excel | Enom Func th Function Sh KebF publi'e and puivate ¢ | the sy ctém So_one (on contiio! tha i excess of data tL o i hosaible 9. “Tk doe) nok have any foishen say Fou idling dala hiding and data so il ’s le hence it puouYdle Mone S Secune ecunity “SG Ss lo. Example of PorP-e wisual haste, foatRan__| __=_c+t_, Tava, c+ dotnet ote ‘pascal Conceht | Prtnetple of 00° Poy There ane many concept of one i ~ Sncahsvlation tt Data abslyaclion anew Oner Polwmow hier ts “Taheat far Dynamic binding 64 l og Piessage at ing mM togethea at_a_Single a | as tion __by default “data _% accessible “te outs | eweccihle -thuough the Function hich ax. cakabped Tt, the clace _-Puruertlina of data dinect access ) by the poiogstaca fg Knowon a data hiding ox oaks lit i (2) | Data —abstiaction - Data absbyaction —uefens —t act of He presen ling essential Leatunes —wtthout including —hacll puound_—_delai| et exhlanalion classes usec =the acept of —abslyacton — and on deGine 0 —a_list af —atluibulé _—_{itte Size tock__and—unclions “te _epenaté on —lheae weight -olti®bule “They — encapsulate atl enselatia —faoporihin of the object” tha anes he _cxeateol __ The _attvibule are called as —_dala.__raernbon.s as__they on holds da fa._and __Funch'on and hey openalane on these data ante —Icno«s —€e as__membea Function _ Class geo _dafa_ab (one | ——--ane_hence ft is aleo Mnown a5 _adt ( abstyact 1 dala “tye _) e H € i i # Include An ass ign at fn. evaluates the ofen fads on the (fv) Ass Peament ae st ihe ypeaaln (=) 0 places ft | ate ee ibo “the Lert ee nthe’ accéenment exfmension must be Single vantoble . Theas ane | Ane! fomas 06 assignment peak they ane = me Simple assignment - Tn __algebanic expression me Found ae expe sion lite — ae Ss, a2 atl azhbrly— Tekk sideofand mist he eau must be able {5 nedeve a valve a. the —Sxpriession TE jhe left opettand Can nob __wedeve @ Value and we. Aston One f ° +e ft we Fel combile enivoy ° . . ; ‘ormpoun dass . ye 18a _Shonf hand nota lfon fon & dl expxession | The Syntax 7s a f € Meer rent € Nawia — QR = 7 itt equivale\ “ts 2 41 a Advantage 26 ihig as Conbound _OiS‘pmeat —_¢ dpenatan e ! (u) on the [oF ( : hot be uehealed and “therefane it become ___£ easien ts ponite = S @) | he _s i a len a. stead € TTnenemenk (4 ne t S = 8 S| Re ohenalaa } rohereas the oObeaat ohe Post Lived increment and decnemen! open Catt dX a--) = | 1 i 4 fe |. fi 2 thus O++ has the ame effect as a2 Geis end Or— has Same effec 3 a = a-) “Ie_dPeP erence helioven art and att fe, 36 ! ++ fo atlen the ohenand_, TL fnexemeat falter place ofler the exhnecsion fs _evalvalec —— ; “Ié_themand_In__poal_ffxed _fyfwiession must hea ; vorlable Pon cxamble = i 1) tet a= 6 = L __B* att tere the vale of of B fs 5. “We yale of ais 6 + (ij ink ve —___. _ Ns w-- 4 Rene Xhe value of Y fs 4, 2% value fs 9 Pree sx --¢ Tay Puefirx —inorement’ wr decrements the SF 2 feck lake _prlace pe fone the. eforer‘an —thafe — conlains the vheatan ts walvaled _+ Tt _—_e€,, Ys__Ahe _stevense__of he post _fi'ved thea: ; r-oxfeesfon ta __has_4he _same_eFfecl’ 0. i mY a Ae A+1 =- 4 has the same _eFfeot as aca-s st Con exaroble - fnt b= 4 * y e. A= ++b 5 [ “Ta this Care the value of “Smal puutevld be <1) Sand AUhould be ¢ SS “Thee fFeok oF both post Cived and |efire _< end L sh ss eodt ti raethon 2 “They ae not: The _o}:erafoe A Bobi fo méanin app A is given babar henalon aise OR obenafen Ke? binte fere deer > 7 ° aot > 0 one’s Compliment" T 1 — ° 5 i § | = Tabla PA vblicit 4 | fro Fuam ne." type Te another ‘alled convencian . 4 | Foukverahle = Convension on Tuansfoumal/on fs g sychanging dallans Fo Hupp: £ | =Ta siroble 0nd t 0 | -tyhe Convencion 0% its tonvent thr exiting tens °, type casting setens t5 changing |_ an entity 96 one data “type {ofa anolhen + An ¢ I sxasnple of tye tanvension ff onveating an | palegen tt etwing “This combaues the “tan numbers € Tan ane tsa sting tnd a “The die helivecr casting x thea ig integea __¢ conversion in. Ce ee Th 3 o0 sling a_dala_tyhe % convenled as dala tyhe by (he fatogsea mien — ia Whaeas tothe tyhe —convenaton , sees tksele convents dala __type fats Ane_ y Nequined data -tyhe ns ) “These awe tan -tGpeo of type _castlay fin _data type Hneg ane - _ —Srolal Fe Pt ghe Canvedlfon _~ t js also Known | as ojiteenalie —tyhe tonuensia “The _omohiles conventé “ dato yhe Rt pin terc does nok Hequime any gnucluement of ween Tn $i wad the acdbilen ic doing (onuension {keel TE geassally Ocourt es saheatoane than one —deita Lyfe _oh« —__ “ bf iN = tot aes Uy fait num2= 785 fot Suen = nym + numo type of Sem inkégen on = 62. The. forapi ea __hene ‘ _conuentt the Flocting number tals he fnterge data ype that 2g 2.8% a. a $ ask valve of Aus , | fnt num = 4¢* tat pupa_*_O+ nuns = 6st4s | : =D __ { [enwes that asl ‘qo 65 —— As we all ~The __Compilen qulomalt'cally adds the _fckt value Fee ec tbh — nom (us) the outbub —_betmena- Wo —_——}—— __ orn ink te double. | Psyoguam oF Con vension fe [LP 8tnclude | pus gan Thi: cif fi S - cates antes ond th calegoulen oe - j Sequestia) Coffin! Flos —dlaléinent Se. | Condtlional + coatial statement ) 4. i Uneondttfonal ¢onliio( _.Stalement Sequeritial Coal! Statement = _______— (Ciijpe) exfwesstan ¢ Ou. : Cy jon; Sequeatieat céattol : alements ensuxen that the fnstiwel/ors ax sialemeat— an executed In the Same onden in which they : in the —_}a09. wana shat fs by default System exeailes the slaleoment In he —puogara in ? Sequential guden : Coal C ste t: __Stalement that ane_evetuted when a Conditiao — ‘ote his _¢latement due deuideol fats _thwee altoauitn aad they ane = (i) dle cision —malitng alalermend ee 421] ti) Decision molting —slalement- = “This —sfalernont 1 Stat tel tase coabol elatemeal oe GL Leah coalivol Slalement> on chelation 4 ~ ane use fr tantre) the felon 2€ executor 9£- a foe oguace by malting _ | ade cPsinn dehend co she —¢tondi ton Hence they axe Knoca os a named an = tec®alon malting Tg lémert~ Seiten malting —shalenent— ane of tye Stole fC sla cal (b)| 6 else stalement r (oi | nectéol i€ else Cal} if else tadden Loy Sis i 2 3 e Li i Biue then fF slalement execute slalémedls thal Immedéotial, Fallon #f The Syntax ie = { Se (text exjresdan lf list of slalement- b 3 Fos, -€xamn)sle -__ Ending —loigeat_o€ tao ne. ______ HE include tot main ¢ 4 i tak_a-§ b=3 fe Ca >ble hi! if elee sla slemeak —— _ Te _tes b re fg _toukech fa qucalén ” XS << endl" elon eke £ cau xs ¢ bis pelea s ? a 27h 5, 3 fe(arb}¢ 2) a wat a < ie | else _£ > I ; nb is guealin <= b << cad} 5 | 2 > l oelinn 0 ¢ (ec) testing 4 else Slatemen{-_~ Th fs__alao nosci ble te ae one 1€_stalemeal tostle Tonathen _@hen 9€ _decda/ons axes _be made. e ele ijn, ———} laced __indtalele ano, thn fe else slalemend —the —— | Sunday fo wi | ie ( tent: lon )& é d Te_( test extessian) - falement: i} 2 ; g else £ & Slalemend-_” € 2 € 2 & else $ : ale [€ (tot exfureston )S statement 3 é eer $ € Slalemeat > ¢ 3 ; Fox example o- ~ Find lastest element. Grom ; iue—thee—Rasben$£$— oN Uy name sage ffl; ink_main() £ —tnte a,b, o> ~ a u Ca>ra>r brre + II 2 € telarc)s | 3 else & 3 3 Gub Couk= 80) aw Cout “se cune “Distichin™ << end! * lee fe (Pen 2260 ) Couk=S0 ¢ Guk << ‘ bxea le * & de Fault ° E (ub <<" Jou ‘on? u c ¢ wtelina 0° Fi q loop, —Coaiol SBlimeat tu aefedelan =< block om Psp—oe Statement executed nefreatédl| y votil _Sane conditon Salisty iS Known ° enclosed _wfthio _¢ 2 byache fe Call ed _bloel on Compound Statement: Hene We can have Hi} te ahish condita t5_trated_—hefaneoaleatay 6 “tar _fy}res o€ leohing sting tenes thr ene ____© |__ state grate fry which Condititoe 7 cheeltedl at | exit conti loo (s—C) he dfulded th Kr eel ato Of (hile loo b slalement a I do hile —loo|> slalement_ Pox lols statemeat fa Ahnee cal gon/es and. they aoHe - body of the loop 3 Ik _fs 6 evaluated and ie tt “Bive —then body of /na/s on enitiy codbiol loop “The _tandifion __ + be be tg oney ex cated AEler eveashion nf body the Condilines gai. body 9 fe evaluated wa executed aneter again . “This watil hts text _condilion peroms else goes ov) J belous © 0. go tt fn clede_< co tien Using Marne shaco std § J nt main 0 ¢ int [=o Sum 0, n Cout “kates nt? 4 fn 270 ¢ while ( xen )¢ Sum 2 Sun +i oy) e po fer 4 om of jak 3 << 0 <<" natusel— Ss Sum _<< endl = cantle ( leat condihion) “The swelaled faaguas In cet fon do able ii 2 oe faliment ie gfulen helo ———— & 4 include I ie (Py. [=eo) > == = fact 1-3, 5 ic ( fakes 2) : sabee las try 2 | relia os > 3 : (3) | Uncoadeki - Gi) 0») ( ahen a bweake sla. Fs encoontia estthin a loop » lool is jwacdsfally oxdled and foromrow continues. with. the slalemesA —imediodly Falling Wop. Continue ts veed te conkinves Ihe Wen abyop oe the oop slalement wahtle by 0 she'pprin yhe_slalement a len conlinveiny The slalern cet Te cabse, thr conbol 16 90 dheelly te the ter “had en ond theo toalinus the loaf, eae 40 — Hull Dimension array a z= ype 2< name ok ayoioy fotze] a 4p = fat ACs ls ee | 30 _ Ena. oF’ onnay IL eee ee _20-sdala lyper tak ws] —Paoiay ts ts. a Finite _no oF harmygenovs. “elements or dala ‘itera ftmeans St conlaln “ane (pe _o€ data only, efther on Folegen »—Flealing _point_no, 4 gh” chon ele . — Dedlaralion fn lang rguape Cok ALE 3 whee fnk_SpcceS icy dala ihe ot tyhe oF elernents Jit Pett Pte PP awiayglertes. _Chonaclén A is name of -and {he no._shee’Fy fn 0 sek of Span baackel AIM he no. of element and _ovutay _¢an Stan e ie “This fs cated size om leng Hh of hr ~ aie is Same Toapoatant Joint thal aust be o S “Then Stemenhered _elaliad ta_onnay_- ius at 7 ify in fr name of axnay , Folloiobd by index an Subs saip hy s cdi S ACY Sei] “he ive element of an owt 2 (3) || -Ke Alements of annoy catll he ahinays Slen0 a > fn Conseaitlue meron location ~__(4) The no of elements that can he Stored) in ana thek ts size of Gn amay i Cajhednd osonadl 5 d > il poe : Puviay Con. alisays be season toxite heough—leop— [@ siead in 1p _annay fk _stequing ene loop fox steading and —ancthea Far_toxiting Foxt_etxample = (aj Reading fon (Teo + Pxcas tes) £ sent! nd”, ACID}? 3 (b) uurthing fou(t=o4 1 za + tt+) § 7 pointe (" Led? BCD} —_——— -—Fo_2h_anuay ft _sequine tie loop Fox a” Date f ¥) Soa on Ss ? ij 4 ‘ool torigeof } = J tin clude cfostre am USing namesShate std_+ ke nt’ main US fot _f, ne “ Float ann Cio) 3 Couk<< “/falen tote no v¢ elemsat [1 4s tno Jz” + é Cin 27a + € Govt << endt 4 & fou [Peo 5 i

You might also like