Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
35 views
17 pages
Oops 1
Oops assignment notes
Uploaded by
nerkardigambar8
AI-enhanced title
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
Download
Save
Save Oops1 For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
35 views
17 pages
Oops 1
Oops assignment notes
Uploaded by
nerkardigambar8
AI-enhanced title
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
Carousel Previous
Carousel Next
Download
Save
Save Oops1 For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save Oops1 For Later
You are on page 1
/ 17
Search
Fullscreen
‘Mumbai Education Trust's INSTITUTE OF ENGINEERING, BKC, NASHIK. Department of Artificial Intelligence and Data Science Course: Object Oriented Programming (210243)’ Class: - SE (AI & DS) UNIT: 1/ Assignment-1 Q CO | Blooms No. Question ‘Mapped | Levels | a fompare Procedure oriented programming Vs Object oriented Go, | Ka K4 rogramming |Create a class “Student” with attributes like name, roll numbe 2, & mark. Include member functions to set & display these) ¢o} K3 latributes. Write a class “Calculator” with methods for addition 3. fubtraction, multiplication and division functions. Create a) COI K3 ject to perform arithmetic operation. 4, [What is difference between pointer and references? col K2 hhat_is_polymorphism? How does it relate to function 5 _bverloading? Colm ERS) 6, [State differences between abstraction and encapsulation. cor | K2Ks 7. |What are C+ access specifiers? Write down their significance! Cot | KI,K2 hat are the different ways to define member functions of al 8.__klass? Give Examples of Each. col K2.K3 tite C++ code that defines a class and declares and array 0} 9 _ [objects to that class. col K3 [Define inline function. Write a C++program for finding the 10 _larea of a triangle using inline functions. col K2,K3 Bloom’s Taxonomy Rubrics: K1 K2 K3 Ka K5 K6 Remember | Understand | Apply | Analyze | Evaluate Create Name of Students: Gra} kwoad Sumit pwn] Roll No: Due Date of Assignment: Date of Submission: 23\8 |2<- Sign of Subject Incharge:PaO iad Paro oy Ey ssisnment Ke O48] 4 Coompore Péocedure o@enked Peoqoamming Vs object » ovented Pecgcamming. Peece deme oviented object oFrended Peogeamming Peoqeamming 3 | Enphasis fs on doing thinge| Erphasis is on data rather not on dala y meann rt than Pee cedtne , * Meann TS Rmavon driven obyect daiven. » | main facoun 's on the fang.) main fecour ts 0 the data fon & Peacedure dhat ope- dyat fo being Operated. tate on data. i BD | Top down Appacch tp Peoqnam| BeTiom OP Appasch fp design | Pema desian i = it D [lorae Peoqram azedivided ip | lowe Péoqnam are divided te Galler Pesqram row an| voto crosses 4 ohpeet. Fenaron. | 3 | most of dhe Rincon Shave) @ata fs Hed Fegethes With 9 Jlobay data, fincnion in the data Shuckwe. Adding oF daka | 4+ fui? ditt] Add? oF data 4 faro dePawit | B | We cannot deciore name | We ay use name Space fos pace decay 5 diveay, Et. Osing Namespace sii! BLER SG Rete | Pasay, | xi ct, Tava, 235, ete | ete t 1» Cerate a class “ Student? With attwibuer like Name, 20 NO. 4 Mork | Fnciude member Runay to set 3 drsPlay Ayese atttibuber, . st inctude < fosheam > # {nctude < Shing > Using mamegpace Std 5 Class) Student 7 Pelvate + Shing’ Mame } tot vol No 5 Float mark + Publre I) Members Puncn'oo 4 Set Student defaila. Nord Set defaille Cshng Shident Name , int Sere Roll No, Float Student mork.) Pame + Stident Name 3 a RON NO = Shudent Roll Nos Tork = Shident mark 5 4 I} wember “Panchon” ty display Student detaile . Nord dismay. Aelailn OL | Cowt
| 4+ inctude < foskeam > Stass Calcwator 1 publre ¢ No method Rr Addit’od double add Cdouble 9, double b) 4 j eeran at by1 tmelhod RE Subbach’oo be double Subpact Cdouble 2, double 4) eu I 3 acon a-bs Il method) Re mut'phicab'ao double multiply (douba, dou b) j 4cqon a * bs I) Method fea division double divide Cdouble ¢, double b) 5 ip Ch==0) q Stayt Cea <<" Extey: oivicion by rem!
> Num a2, Std 2) Cout <<" Ent OPperahion CH, —, + Std =) cin >> OPewaton double tesurt 5 witen Copranon) 9 Cage | +75 resuit = Cale. add Cnumi, num?) + boeak + Case ~? + tesult = care. subhact Crum), numa)" beeak 5 reset Aieey reesult = calc. multiply Coumi, num 2)! baeais Gases t fos rResurt = cate. divide Cnumi, Puma) : boeak 5 Ikawt + shld ty Cer <<" Fnvalrd opevabion 1’<
| Gan be nw Ci-e Point to po Vatrd memory Address) Cannot be pw, must aed acer do an existing objet | Can be reassigned t© point: Gannot be Peassigned do AiFe. ob) oF memory lo- artes lnitilized. Canoe, ns wy | Can acess 4 moanipurake tux memory addoess Osing Cannot digecny access 0& manipwaken memory fa oP erator ec, Address. _— Typicaty oCeurrer Memory Csize oF pointes 4 ov 8 byter), usu ally Addit¥tonas memory head @y 41g an aoe No ya seek ate Sees| & [can beiniHatacd te na | myst be lott Waxed saben any Maud memoy Addess | dedaved and Cannot be [eft Unini Haired. | t | j D [Gan dectore gq Gnstant | San be made Gnstant vig Con pointes CT @nst pte)ov) keywoed | meaning tu a Poinky to a Qostant | ReRerence tsa h Gan't Cconst’ Tt ptr) Ghange 3 [Can have mune Jevae| wo mut Ply evel of indivechdo por indiweci'on Cent pointes || C Mo PePerence te acference) do poinks SJ What fs polymorphisms 2 HOW doer ib Relate fo L fircron + Ovewloading & | — | Polymorphism: — 2 Polymorphism Meann tte abilrty fo make moze dhan one feom, + 2 allems 9 Single name te be Used ae mote fran one Reiated PUrPose. 2 It meanc abiiity oF operalorn and Runcy’on to ack diffenentty th dIRF. Situation, + dr PES tuper OP Polymorphism oat i L t 1 T | IL p 4} t { Polymor phisno Compile Hme Pun time CEorty BindIne) Clate Binding) 7 Fanch'on Operator Cy en et Reocneo) puerloading OV e loading Ceynamre Binding)fan cy'on Overtoading 3 — cCHce of declor Stonakrey Moe Alifferent of type ts Not alowed, tape - Reaton ing dur Same fancroo with diFFesent + Te Same fancHoo Name Poramefes and + ONealoading of -finch’on Spore cipP bebo. abshachon overloading Ps the Pea. toil be sec with” Pooamekr of o/FP. with df PF. ~eeken and encapswahoo encapsulaboo. eu Abshact peers fo biding dhe ImPlemenfahon details and only the essential ef an object Showing Poakoee Preapswaron eefear fo ecildtn dhe data Cakfarbutes) > the method CRunch’on) that Operate on dus data inh 4 gale Unit Cerass) _ » To Pwr on kihat an object doen rather than how tt does it, 4 do allo@ dipf tm plemen fah'on 8% gat ePind) TokrPace. To Peotect: fue data fiom outside «fo krfaces and misue by Peshiching: dioect ocr fo Same OP dre obvecre Bmponcom, Acheived diush abs pact asses and infer Pace Cohere Some Mehhodo qree Bee AcbeNed trough acess modif- Vike Peivote, pea fected _ Publish ehten Go fel eno and | dectored cordbout 1 Plemo- | noahon. | 7 aecess do crags. Membon, Sea) imp Inkana) daba, cand, “poche. hidden 1 and D infact orth the | -eaposed inkwface - ce 5) Whan an obsect Ps oF e | He doen _Ctnknface) ©) | fecouses ef deRning the facouses oo Sapegarn behaviour without Mmplem| d d__ensming _ o entakion detasls foheqaity oF the obyeck Ps au maintaned+ he y Pri- An absShact elass A crass Peason that encapsys: Shape with an abshact | Hu age a probe and Pao method deauw (). vi get: age O. = What ave C++ acess Speaherc 2 crite down drotr rani Picances- ~— | Acess Speadtfienr :- “clacs dhe daka paiyotc like “The ace “acess § Speciff each ten monnee daha aah be -accegseen only _membirer of same Giecs’ Sn Acees Irewti Ths acheives ta data _bidiing peeperty. _ Speci Freances ! Acese Spectreas help enfaace Cnmpeuation « Which culows crasses Jo hide dnerr infeana data and, peovide Gohmiled Inkrface: 1) Pycapsajap'on +> YF Dota pectecon'- BY Resh’cHing help fofenee EP@P- Sulating acess to Gutain _pointn ofa class, acess: Specrfnn “help Ppeoteck) ts inkyny OF dug class data « RE Cas Cwidi'cal “dota can be made péivate da p&event dive medificab’on by @nyerno) fun cHon- ie > ‘Io heet fance @ppol i Soheet fance is a key Peahre SF OOP, sy acess Spea'feer poy an Fmporjact cole Ip Qopolling boO members ave inhemited ~ with Péofected , RE ex!- base crass member. | Cleow tnkrPace Definaton t+ Publre. member deine te. Qiasses fnkePace , making * Cleor _fo_Osert OF fue class what Rineonaily {S [available to hem. 3) | fuhah ave te IPP. ways do denne membes fancio? ge | Mop 9: chars Save Bx. OR seaen, a ce it ties Dal ag ee2 Memhes PunctH’on oF GO crass :- © S8efined tnside gq class, + The Rincon defined eostnin dur crass fe usualty cated a3 member fanch’on tn ctt 3 ft ts Colted method “in object t o%ented —_ P&o gramming + The data declawed along caith Some dota type ts cated a3 fen dota memhene oP that Chass , 5 Ext # Inctude < fosheam > Giass Example JL Public ! void olisplay Ort dt! Cont << Indra Rincon cwtthin ftucctass!’ €< Stas endl; es int main OL Example ob] 5 ohy. display Oi tt lp Holine RincHion Wfthin te class | | resknn 05 5 2) Ockined oufside fer crags» The member -Rinewon Fs dectoved insrde fu Class bok defined o)P of it Using: Jer scope — Resolubon Operafom \', BAY a oe =db foctude < ios feam> : free -etags Pxarpie cae pentane Publre § or Nord at'splay C21 Mf Deetorahbo 4 memeren Rut ao : P DeFiniah'on oF Membes Runch’oo suse fue tess word PRLS aisplay OL SHE Cout 2<" Runcnion defined SIP tue ctoss! 4X statis endls ae fod main OL Example obj 5 obs. display O+% If o}p. Rinaren defined —olp_ tee class | fefurn 0) Weite Crt code that defines a cass and deaod and array of Object do drat crags st incude
. SaESE Mae ee ee ee + PINabe Using namespace stay N) @eFine a crass Catted. 0 student”! Class Shident §shing name > fotagqe 5 tnt Ta } plublre 3 OPaut Gn Spuctor student O 1 name =" Unknown" 5 age= 03 j td = 03 Me Poram ajeriged Gnsphucpor Student Csteing 9, Inka, ‘ot}) TY member fancr'oo fo atsplay shident detalis Void crsplay © Gnst fy out *<" Mame 1% << pame <4”, Age 1” 45 : age 24", .. UPL) 2e td ZC ents %3 isk mao OL | I] Oeclored an aeray oP Student obyede, student student [3] = { { Shudent C'Sumit 18 Te), Btudene (" Yogesh’! 21, 122) Shadent C" chaifanug’”, 19, 193)ty Leep through da array and display deta'is . fe Cint feo, i
[+ doline fUnction s. The Tntine. funct’on fs a Rupction Wh Code fs @pred in Place oF each Rincon cel, Tur | foline SpeciBenn drat dus Gmpiler Should insert du Gmpiche body af finchon *m eveay Bntent where dus Rincon ts used. HE toctude
Using name Space ods N Glass deforhon RE tounge Siass faransie 1 pelyobe . Flow base } Feat bersht ; i st) Senshucer doi initiiixe da pase G haght DHMH] fe base >} height Public + Ttiansle Coals, Rear ae - base Ch) Cage =J doune Panevon fo cloietate For mea of dur }efangle faline Float anea 0 Ff | ackan Cost base + beloht )* Z oe [3 2 1D Rncion do Vsplay fur mea. ne Noid display Prrea 0 F ie tout <2" The orea OF the feangie fs +” ae meq 0) << CNdly 3 43 fot mao O FL I] Create an object oF Hue Torangle Class) oat, base , berght 5 Gout
> base + Gout <<" nkr dur herght oP fee dvangle i" Sin >? hefshts forangle fnangie Chase , height)! 1} Gan yea drspray Arveq functon sHerangie _- display fread) + | teen 05
You might also like
Imgtopdf 2909221401056
PDF
No ratings yet
Imgtopdf 2909221401056
39 pages
12304005N54272 46960 Oop-1
PDF
No ratings yet
12304005N54272 46960 Oop-1
9 pages
C++ Notes
PDF
No ratings yet
C++ Notes
8 pages
Oops 02
PDF
No ratings yet
Oops 02
25 pages
CPP Notes - 01
PDF
No ratings yet
CPP Notes - 01
30 pages
OOP Assignment
PDF
No ratings yet
OOP Assignment
10 pages
OOPS
PDF
No ratings yet
OOPS
53 pages
Oops Assignment
PDF
No ratings yet
Oops Assignment
11 pages
OOPS Notes ? - Removed
PDF
No ratings yet
OOPS Notes ? - Removed
20 pages
OOP Practical
PDF
No ratings yet
OOP Practical
30 pages
C++
PDF
No ratings yet
C++
22 pages
DocScanner 03-Aug-2024 2-00 PM
PDF
No ratings yet
DocScanner 03-Aug-2024 2-00 PM
9 pages
Oodp Unit 1
PDF
No ratings yet
Oodp Unit 1
38 pages
OOSD
PDF
No ratings yet
OOSD
20 pages
Oops
PDF
No ratings yet
Oops
21 pages
Object Oriented Programming With C++
PDF
No ratings yet
Object Oriented Programming With C++
9 pages
Opp Ass2
PDF
No ratings yet
Opp Ass2
10 pages
C++ Notes FULL - Compressed
PDF
No ratings yet
C++ Notes FULL - Compressed
176 pages
Oop
PDF
No ratings yet
Oop
20 pages
OOPs Unit - 1 and 2
PDF
No ratings yet
OOPs Unit - 1 and 2
61 pages
OOP Assignment No 2
PDF
No ratings yet
OOP Assignment No 2
10 pages
Sample Note Oopm
PDF
No ratings yet
Sample Note Oopm
8 pages
Java Unit-1
PDF
No ratings yet
Java Unit-1
12 pages
Solution Sheet For Regular PYQ Paper 2023
PDF
No ratings yet
Solution Sheet For Regular PYQ Paper 2023
29 pages
Adobe Scan 19 Oct 2024
PDF
No ratings yet
Adobe Scan 19 Oct 2024
20 pages
Oop
PDF
No ratings yet
Oop
65 pages
Data Structre and Algorithm
PDF
No ratings yet
Data Structre and Algorithm
109 pages
OOP Ques
PDF
No ratings yet
OOP Ques
10 pages
C++ (Unit-3) No Operator Overloading
PDF
No ratings yet
C++ (Unit-3) No Operator Overloading
21 pages
DocScanner 30 Sept 2024 2 33 PM
PDF
No ratings yet
DocScanner 30 Sept 2024 2 33 PM
12 pages
C++ Test3 2009
PDF
No ratings yet
C++ Test3 2009
2 pages
Oop Practical Manual
PDF
100% (1)
Oop Practical Manual
34 pages
Accessing Class Member Example
PDF
No ratings yet
Accessing Class Member Example
24 pages
Unit 5, 6, & 7
PDF
No ratings yet
Unit 5, 6, & 7
21 pages
DSA Beginner To Advanced Guide?
PDF
No ratings yet
DSA Beginner To Advanced Guide?
110 pages
OOP Prelim Paper Solution
PDF
No ratings yet
OOP Prelim Paper Solution
27 pages
1SG19IS043 - Karthik Bharadwaj.P - OOC
PDF
No ratings yet
1SG19IS043 - Karthik Bharadwaj.P - OOC
17 pages
CA Assignment
PDF
No ratings yet
CA Assignment
52 pages
OOPS Handwritten Notes
PDF
No ratings yet
OOPS Handwritten Notes
20 pages
Oops 01
PDF
No ratings yet
Oops 01
16 pages
C# Topic 2nd 3rd
PDF
No ratings yet
C# Topic 2nd 3rd
36 pages
Java 6
PDF
No ratings yet
Java 6
32 pages
Lab 04
PDF
No ratings yet
Lab 04
10 pages
C++ - OOPS Part-1
PDF
No ratings yet
C++ - OOPS Part-1
25 pages
C - Home Assignment
PDF
No ratings yet
C - Home Assignment
8 pages
1
PDF
No ratings yet
1
8 pages
Oops Notes Curated by Sameer Raza
PDF
No ratings yet
Oops Notes Curated by Sameer Raza
21 pages
Question 1,2,3,4
PDF
No ratings yet
Question 1,2,3,4
33 pages
C++ Practical File
PDF
No ratings yet
C++ Practical File
17 pages
Dsu Notes
PDF
No ratings yet
Dsu Notes
110 pages
CPP Unit1
PDF
No ratings yet
CPP Unit1
15 pages
Opp's Assignment2
PDF
No ratings yet
Opp's Assignment2
12 pages
Organized
PDF
No ratings yet
Organized
82 pages
CH - No - 3 C - Que and Answer 14-Mar-2022 21-22-50
PDF
No ratings yet
CH - No - 3 C - Que and Answer 14-Mar-2022 21-22-50
33 pages
Chapter No-02. Functions and Constructors.
PDF
No ratings yet
Chapter No-02. Functions and Constructors.
27 pages
Object Oriented Programming Lab 5
PDF
No ratings yet
Object Oriented Programming Lab 5
8 pages
OOP Programs 2025
PDF
No ratings yet
OOP Programs 2025
39 pages
OOPSDA23BCA0186
PDF
No ratings yet
OOPSDA23BCA0186
7 pages
BCSL 032
PDF
No ratings yet
BCSL 032
16 pages
DSA Patil Anurag 50
PDF
No ratings yet
DSA Patil Anurag 50
105 pages
Shauryang
PDF
No ratings yet
Shauryang
1 page
Graph Connectivity Flowchart
PDF
No ratings yet
Graph Connectivity Flowchart
1 page
MET'S Institute of Engineering Department of AI&DS Academic Year 2024-25, Sem - II Class: SE Roll No: Stud. Name
PDF
No ratings yet
MET'S Institute of Engineering Department of AI&DS Academic Year 2024-25, Sem - II Class: SE Roll No: Stud. Name
1 page
BCS Assignment No 4
PDF
No ratings yet
BCS Assignment No 4
3 pages
Bcs Assignment No 3
PDF
No ratings yet
Bcs Assignment No 3
2 pages