Download as pdf
Download as pdf
You are on page 1of 23
y @25) Rajiv Gandhi Proudyogiki Vishwavidyalaya Nese 7 (University of Technology of Madhya Pradesh) SZ —_ Airport Road, Gandhi Nagar, Bhopal-462033 END SEM EXAMINATION — DECEMBER-2020 (For Offline Open Book Examination only) B.E/B.Tech./B. Pharm/BE-PTDC/B.Arch./MCA/M.E,/M.Tech/M.Pharm./M.Arch. / Tech(PTYMCA DD/MBA INT/Pharm-D Total No, of pages uscd: | 2.7 Subject Code: [C[5]- [3[o]5 Branch : CS Subject Title_O-O-P- Enrolment No. : 08 r S| Ps tee se) nla ee oul aaa Date of Examination: 2 6 )0 2] 202/ Time of Examination: __/0'00 AMY Signature of the Candidate (Must be as per Institute Record): [ oe Date of Birth (Candidate need to fill) : Qo} ta} al oj of o Identification proof (Tick any one and write number) Ma PAN Card/ Voter ID /Aadhar Card Number F157 5] a] 115] 315] 3] 3] a] IMPORTANT INSTRUCTIONS : 1. Candidate must start writing from this page. 2. Any part of page / pages should not be left blank, This is necessary to reduce the size of the pdf file. Before uploading the pif file please check and ensure that writen text is readable, If you are not able to upload answer book, kindly submit original answer book at nearest collection centre only. 3, There should not be any cuting/ overwriting in the enrollment number, 4, Answer must be precise and to the point, 5. Students should take the printout ofthis page much before the start of the exam and complete the entries, 6. The candidate must enter the total no. of pages used on the top of this cover page. Cover page is no. 1. 7. Please read the Instruction for exam December-2020, which is already uploaded in the website www.rppv.ac.in, and Students Portal, 8. Each page must be numbered and candidates must sign on the bottom of each pa 9, Only one side writing is allowed on A4 size answer sheets and don't Sean blank pages. ‘Start Writing from here : Fnroment No, ....O.19% von Paper code. £52395. Page no, <2 that Com be used template Jer Creating Copies -4f Such modulo m demand + Thus, ~-an_objest _y considexed do _be a parhboned ae ompule, memory That. AOL ES — an ace ct 2 Ancona Parti pons on indepen dont Dre Objec can be wed in a Yarsety “ ont 509 To, Z / th bs Obtect - oviented pxoorammly ww a prothced cone. pu J Lnttredology, hat nlouyages © p2oclbu» detign and. LOONE reuse * Oop weate date os a cribtal 2 lomant In dha. program dovilopminty and does not how Jt 40. jlow Jace Ly pijoun dl Tha __ Sg. dem: at hy cedex ore Closely fo Te Lunchorn hoch _ __cporake oh id nd faotects It fron | Z Ob Wc aho, om outy ee mpion: OOP ctlows decompodbon a) _ptohlem nde & puimber a DP enbtier wlth objecie: | fan bustle dude ane) funtion s. (4 ye Enrolment No, O19 Paper cote, C++, smalltalk, Java efe- saa Some -impertant— feakou ae prestamning: We Laphasis ison lade qathe, The proredure UL programs ace divided Jato uot ave (WD. uc pure i That they ___Chavacterige fhe __ObEcH. (IY Furchon that operate on dre deta Ie Objects ave re-l_#O ge Fn inthe (W Dever is hicklon and Canpat be atc ened by exlewnad fetes, \wZ Objects Wis odin) cose with each Other Poresig unt Hons Enrolment No, 219.2, 2 Mejor Jeahms ‘hat are tepué ed gfe — Paper code &: B..Page n0, 2.1 ef Date encapsulabon ) Automate Ob secs 4g jn 1. c. j inihialéaton and lear up oF operuty _Qvarloadiny . Ce Oe fal The. for neg pn Pp procdure = orfinkd Prcog-samming are oF f ollows — SNe | object owiented progreaning | Procedure orthed _Progromnin Yu 36 emphasizes on 3b emphasizes om dete. sathen therm doing things ox Pro ceclurre slp aithms 2) Progtoms aye. lowe program “decomposed into Obstet ate. decompocer/ into functions: Stiuetuve used Most @. tae __{unt hon Ahore glo bad dota. — 9268/90 FO. Enrolment No, raper code, S*Alo_|_ obj ect oriented _progya mming } Procedure: viride 4) Data 4 hidden cid [ dete move openly Cannot be xt/ested! around Phe Syckm by external Jumedions {_ fm _funthon 70 “dune Pon 5) | 00P Jollows bosom | pop 40 tows top Lp. approach Lh down approch Prager desigh fis pxogvan design Drs 3) La) = Obsect cu'enkd program ln Coop) treed dada Os ah Btteal element in the vom _dlevelopmen> and __ does not permit jf 40 fo. foey wound. fhe ae fp tia clot losely fe on. hut operctes _ a i 7 an d prevents it A Jyo. out Oop decom pote a paxvahle a number i nb tes pow ( an, Thy bull £ ptas thew Obstet Jeunt ban Fnrotvett NO O92 E8L9.19. 22 uum Paper vote, £32,325. tage wo, LY Object can acces the funchonofe- — Other — objec * Frg (Wf shows fro ——orgenizodion of dude _ane_fuunctions ae 0 ORm “Object x obyet Y [Delay ([(BekT \ eer — hee Funthon \_ / Bake} ee De funda men tel. Idea behind _Ohyect - Oven ted PL0GV. mominy iL fo. om bine both dul and fJunthon /oto ingle tally > Such a unth i calle d. obyech - Enrolment No... £55325. wage no. taper code... Pros C3)-Cb)'- C44 Supports a wide variely gf clade Type ___anel__ fhe __ 709 Fammen__Can elect He __jype appropriate fo fha_neede _%- * Hower. eprestnkabion tnd machine —_Inctruchon 40 ~ _smanipul ake A oto. i oc hing 72 prachin Lthousgh ‘Ct? nS wuchon aye 'denblad Ou uth mathire- 2 Dotu type in cap cee Can pe C)assspied Under veous Categories: CtHt Duta Type: ao T 1 J USO = defined Ty pe Built in type Derived type VY Struc ture l ) oaray Y_union | \ Y Lunchior cles f 3) point UY) enumeretion YW) Vefonen ta void Sn tegra) Type Clocking type a SS Za td Char pleat double. an obsect + ach Object hes cu dype, — jus) like Vonuhle off ra five Ay pe. CShorb, thar, eb). For “exemple {) we lefins a lad able J ‘Tesd Zhen Object Cen be _ of _/ype fou tet fusk a_nosdive vanlabl Con be g type chart - However, oad Ponek . . 6 17 42__use Use> ck {raed date f+ypes- Sing {ho yllen bes ho jortin.ss: Kole there types, We house +0 tel. Dp! Kacdly Lohap hey ve and GBA how They Wor ky wef 9 Fas by defining a add» LHICh fet both the date onkuine fp Sn fa ule dogine 1 vor ble Ya axe hud openation Can be payer on These olesdet + Cf'— CS trueture, Clasgex, union ne). enum ovoded duly type are Used defined data ty go. Se =—T VE * Enrolment No, ......Q/ Ps LU) fa)! — ~—f lass _descathes a group gf objec Common, rtelohin ships, 7o__ otha objects OM} Ay’ ’ O77, animal, proces id _windocd) ave all Obfect PRO a Closs Clos Name ~ Prfvate £ Variable cdeclormbon 4 duntpon declorahrn - Pu biic’. Vor'e ble declarabon qunlttion declavubon a We declare oe Memben s Clagg as StodC udhen alt oO b-sects The Some Clots chore Comin Skemg of ‘norm uhoy + pb State doen 4 member 2d ques’ /q ble udlthin The eH yp yert fb live 411) the eA rc sh) Farniment Na. _O1926 $). 02... Paper vote.6= 208. Page no. £2 A Seti claves mom beet c/opl bee fo Toa — LB bidy 4 difpersnt. le a pormel Static vone ble Ey US eof fo. Vetain in loxm, betwooe 402 _Juntho Li Ci a Usd £0 Shore Inn bon among Te ie Preem given stow uf shebe debe # Include < los tream: {p> USing Womespure 31d" Class jm Stohie int count + Int num bey - Publi Uold_yeddubar/ nb a) 3 humbe ra: Cound Zam y Vold get Cound C void ) Couk ce “Coun) 2 if Couk ce Combe” jn, % allele Log? Boralment NO yn QL ARGS AAA OL Coens Raper cnte..CefeE Okie Page no. 24 ‘=a Tt int item i* cound Be Paneer) s Hem a, hy Uloullhis inihalized * 2era A get Count (), _// display Count - b: get Count ¢ 1s, 9th daty (/00) 1/ reine guthrg cata — b* 9¢¢ dasa (00) Coutkce“ Aik» > . dafadliceh! y, ——b-_get count (),, etn O07 _ op [ns £4. Ef b P= A conctuclo a member J untd/on f Phe Clegg ond s/t ss alle d each time” Loken ch bject MN on AIZES.f Paper covte,.£22.25,.Page mo. 2 _A__Constuehy —funchon hes dame name —4i_the ___cjas ay [fe uSe cay Whth a ets Conn an _Conthut tor Mt i's guaranteed That on obyect Creal by The Cass» A ni Habsze ifs. deta member - etd NO need 12 cull fhe Cops tuchr on SP prately- ye Destructey ’- Destruthys ary TA2 complement Fe The. Constuhys + The _ destructor: ———iunthon hos fhe come fame at wu / IS prece by a ~/tide sgn) + the boss purpose oe destuchy 4 to ké/, the objelt and 72 /Atlyn jy elas ing. Lh Memnary Ortupled buy The Obgec# Dhow 5 2b — DL tn tegen CJ £ & A destruc hy Loin Fekes Ciyy Groumin} Noy _doex ‘+ xe turn . Enrolment No. .....Q492. 651410 FO. COY block or foraye that's example Be H Include < fosteam: hz loss ¢)eSS soe Alome g int a, b+ Public * loss Name (int x int y) 5 //tonsputhor ™ Clogs Alume 0) destuchy funthen word chow (Js a Cluss Name £¢ Clatt nome Lintx, jnty) gs t aen» boy: y : void Close. Nome % * chow C) g Couk Ze\n a=” Ceace"b~"ech a “Class. Nome 3” ~ Class. Nome C) £ loutc<'n Desthuepiny fhe obzecd 5 Fnrotment No. OL92. C8 [910 FO. cone Paper cote con. LRA Page m0. LY int fein ¢) aries Sse — Class Name _ob3' (6,8); —___—__—_— ————_Obg) chow ey. run 0, — y e Thi 4 ars 2 and Des huching pre Obfect - L$ C5)! (a) 1- —__Thep mechonpem gf deniving a _new class — The d ensived lage Inherits at he Capa bilities ot The hace lutf and Can add intmmbt end Oxken sont of its own: The mechanism 9 alia Coble d Inher dance > Pere Coe fotecing fom Dn hers kun WD ingle Snheri'tonce- __ derived Clog wilh only One bete Class cotled ingle. leve J Inhens'sance- [8] Bow cley L TD ] Devved Clex- cde ay A Pr vase Alo - Public? int bs Void get ahl)s In} Show afvosd): ae Clegg D2 Pubic BY fublc derivehon- § inte, Public + Void ut Cupid) Vos d Usploy fyordl)- % baile Nulbple herituncs~ A derived C/es4 wth & wudtiple Whe Js tenco. 2) The Syntex tub bebe bib at fo loiar Chess)! vist bility BB vis'bii'ry B2 4 —— Weds Fe D) Re Rae Poa vient No. nn OLIZESA ILO. Z wile S305... Pape no, L6 (it) Hiexarchial Spherrkince '- The jeakires — —F—72_Cles _moy be _inhevided by yore Than one Clagg- 94 Called hierorchial ; Snhexitince » | [3 . __ iil v P Hievarchial Inheu' sete. IB ire Test ’ (wv) Multblevel Inhetitance 1 - The mec honism j desxé ving (a ‘ad fyom onothen Mdorn EE lad F 9n hensdance. ey! class A I/ Roye Clay ¢ ey Clos 182 Public BI 2 derived prom es a Clos8 C% Pubhc 2 C derived Jrom ie = = Enrolment No. ..QLI2 CS ty a Inkomedic ae Dover cule] Chidd Mult level 9. keri tence Wy) i Inhexiknce :- yon we need 100 oc mre type of in heni kente » Kags to g 3 ed Per. pacogran This pyeress ta hy bd Snhersdente . Vold getdeta Lind x) § 7ollne =x; Vo/d Putdate, CvoPd) Stout Ce" ho Number : Ye r0))po, % a3 cles Ehgineeding L Public Skudent flout subd, sub2- Public? Vola 9tt marks (float) floes >) fet Leg. Coukce “Subject |2? oc Sub) Cout ce “Supyeh 22 2¢ Sub2, 45 Clot medica! * public hidepd g float Sub 1, suh2 + “publi i void Get swanky ( Feat, Lhoat yp) U £ uhd= Mm, » Sup = m, | vold Pudmarke Cvosd) uber “suibsecd Jz) Ee Sub) + oukee “Suby'aef2=)) << Sub2, 4 54 Jat mair C) $ tudent * Py Engineering e + medical m+ 2+ getelate ( Joo!) *, P= Bey P-> Putdeatac) aot Jeg” Enroiment No... O192C$ 190 FO £5730 Bpage no...22 29 getmarks (S0:6, borg), ———R>__ Putmarks C3 P= getmorke £904, 29°F) P33 pudmarkcl); TWh 0, 5 SYED) a i= tm t in ye WIS _ Yat _Computen town 00 0: ently. 9 general there wre fo type of- Multitasking < proces = hated and thread — be ced « Pre f conted nc {wo ox M0X. paxks. het Cah Fun concurrently Fach past A y Zz a thre. ond. a Ch, thread alg hac! cw cprate _posth, e2ecuhon. Foralment No... OL92.8 1910.7 * +H include ¢ Pee ae —#t include Ciel |j, ee oF tochile A Pi) aap eee —— ing namespace cd A defines oi Typeaps Stwet thettad dale fo Lat fread id + hur + mefoge - Ga Void 74 Pont Hello (void * hseadarg ) £ teutt Fbread lado * mye dodo, My. dala =(oruce Spread. dula*) thyeadury Cout ce 4 Shyeag TD Vee 104 dube 3 dpgod thread jd: lout Le" Meso >” Ce My. dubg ) mjpo 9¢ec end § Pth ved Oxy't CN ULL) uy int main 1) & Res% Pthread t threade [NvM_TH EADS): int Tey Ind ty forf Jeo, J< NUM THREADS . fd) - Louk << nailh 7) ' Creabiny thread, He = Proved create (2 thrend CLI Mule, 4 Pthread— ext} (nolL); bi uy fey Enrotment No, raper code. S325. Page no. . 22 fms 2 CC) bit a , i. ere Access Modi Her ove used 40 imple mend ah —impor-fan} — aspect of. obyert - ariended ___ a Programminy —kaown 04 dads —_hr/duing » —__ ee cer prauate and prokeked . Public = A publi aumben 24 At cy ble liithin a QLogrIm + You an Set tnd get fhe hii of tb I, Vo wa ble ithaut Any 20 ¢a7 B. whhon « @B Hrwor Vv patvate / BA payyate memhen vonad a wachon phot 24 Av etsed y Or 2uen Viewer h J20. ut Ciel, Fhe. C fad - Only fle Lf And ¢ rend. (ZN ah Atle Paavo Le ne box By de taut LL fhe member of clot ubuld be private ex Mple in the 4o/| Lavin g Loss jaa provable pumbe) . Farotment No. ....O1! protected /- A_prkcied _membo._yartable— _ oe chon _és Josy imlay FO & —prlvore member hut jd provided one — Additional bene it That /tay Can _be Bess) in Child laghé( _ uShich The pavate. member an only 4b AC CeMed from Within the _ C/ats* Howevey _y jmend Classes and __-Jryend — junc hon Can Actes private membey- The___‘private’ Meyword 4 used +o ‘yo ote poivute mem ber - a f a

You might also like