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)
285 views
OOPS Handwritten Notes
sfdfs
Uploaded by
rahul khandelwal
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 now
Download
Save OOPS Handwritten Notes For Later
Download
Save
Save OOPS Handwritten Notes For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
285 views
OOPS Handwritten Notes
sfdfs
Uploaded by
rahul khandelwal
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 now
Download
Save OOPS Handwritten Notes For Later
Carousel Previous
Carousel Next
Download
Save
Save OOPS Handwritten Notes For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 20
Search
Fullscreen
boas bmata “aim of 00 = ise tte.) bind together tne Onin cine functions thats operate on ‘them Zo mo other part of he code Can “access cthis davai, mlignexcept: thia- function. SFE fn ¢ 20h hel Class + Tk-\i8) a user defined) datatypes, Which herdg Ss own data memberg and member -Punctionsipwh con be accessed and used by creating an Insta of —that clas. Object : When a cass is defined no memory is allocated but when Wt 18 “nstontiated Ci-e,object iS created) memory iB allocated. Encapsulotion: In ooP 7 Encapsulation is defined ag binding together the dota and the inctiong that Mani pulates ¢ £ Abstraction: Abstraction means displaying only essenrial information and hiding he detcial. sAbsraction using ctaskeg + Absrnaction esi, Header Piteg Cmatn-h —> pow Polymorphism : “rn simple words , we can de Fin as the ability “ae le { of a meSSage tp be displayed — more than one form. + Function overteadi “| Operator overtoadi a G Tat sum C0, 20 , 3a) ‘mt gum Cio, 20)ee heritance + “The seapabtitty” dina seas = propertien and characterlariog from SAS cated Rnhertxances, Se oR, Subciass~ sais et 6+) Superciass Be ier Re we : ; Dymamte Binding ! th dynamic binding, the code be execureN An vesponse 40 fuhetion> calls » decided at yun time. a Congtructoms: A constructor i8 a member function o Q@ class Which {nittaltzes objects iofiva? classe Constmuctor {% automatically called When the ok creates » Tr hes 7Same. name as Ctwss; Atselt .oigitluly Consrsuctor don't have a) Serum -+ype- 4, Defavir Constwuctor (No porameter Passed) _ Re Parametrized Constvuctos me f BS Acopy, Ponsre ucts See 3 in i = Desteuctos tn Ctt * Perived clasp destwue joe Invoked firat ,-then the bose clazae de wit! be “invoked. Access Modifier: fublic — can be accessed aby” Private i= Gan be Accessed _bn\y iby a1 Fam: Clasp Cfnaccestnle ourside the. |Cleas) Orected = TF iB also 4ngecess\ ble ON — Class but.
Compile time foly Function YC => Run ttme Poy” 52 Avord U code Sroucture Vs closs + ee Smposttart “SiS NS Security. Tot STS A Srouctuse %2 Mot Secure and cannot © RR membes function and variable” \B Secuse and can hide FE Bestcping derchila. 0g SREP é local Classen tn C++ « A class declared. Inside @ Punction becomes local to “Hat funetion ond 12 alle \oca\ €iass - Ate tne mexnodz of lecal
Shee Virtual Function and Runtime Poly morphism ¢ function if a membew MPunction aw) A virtual 6 decaved within a bose dloag and rede® (everriden) by derived claze Funcflora are declared with Vistual Keyword H base Clasz, jholt) 70g) TSIEN Exceptfon ona ing. Rn Crt! uy 2 vepreser a block of Gode that § an €xeeprtion . osesmnt a block Of (code When error if “MrowM(si-9) Use9 “tm —-HrowW On exTiere (8 QQ Specia\oip cath: “block 7? © catenGes), A+ catches all types et erro: 3 + Taline Function = Inline iB a Yequest not command , vue TH 12 function har is expanded 4n_ line When ¥ te Called. When +ne “Inline fmction ts called ,» whol Code get “inserted or Subetitvted at the pote of Sn) fonction call, Sale vernn—ty pe Func ) Peni 6 Rey BE t / __* Function Overloading 48 a feature mn C++ —whele / sno Boriimerel) Wnttons © an vihove...came manele Al ferent porameterz « Ne ier E } Void print (tnt L) Print Clore rq SvussOHere IRSRNN “here will be onyin copy ef Static member variab for -ne Whole clage. ibys Exs Class Account Fi 4 private 4 fox balance; Stoic fox Tot 7 public + Noid SetBalance Ctar by — i batonce =b ; b Mintalised outside oss Float — Account 2% Yot Void main f Account aay 4“declored’ ag “ + aw any THIS RS toy ‘unetion “in a Css (+ Static 2 TF ane oe 96 Nee Static > member functiong = are” Tanowed 40” % ony -he Static data memberz ot other stat member Funesiong , pnrisnol YS eConstructora qa (ays 2 Constuctors_ ig an Special member. yotun chionin/iak = | Class. Er _|s automaticaly Fnveked when 1S created. ae 2 hes | no retwrn type 7 f 3 Constructsr has Same vame as Class Hsel > I we do not specify ,otnen Gre compiler generat @ default Comptructor for us Serre 7 1g 2 p a > Conawriever Js bene Defavtt forometerized copy CilassLname() - s@lass_name. Cparamerera)> sass.) update) 911 jem update Cte 0, snk) oe a Y Son Bbasi0 jb uw > +Q=Oyleve 2eNq Su be AeA iowa 26 4! or vatguey enegll___ Compiiter eneratez — 4 Deta Gnstructor 4 2. Copy ARES amo nconsrructer by Tselh 1 Bot i} any of the aonstvuctor = 12% cragred by user then “dejauit constructor Will not be created by Compiler « Construction overloading can be done fonerion evertoading, ’ v Theas Dejavit CGempiter’a) Copy Constructor Can done only "shallow Copy - 3 aT J Cfoints to Sami A a merry lear + — ej} — opp Obj 2 + Deep Copy is Possible only witr user defined cons th wer’ defined Copy constructor , we mare cove golntera of copied opject pots -to new memory Can we make Copy onstructor private 7 Yes Way arquinent to Gopy Censtructor must be passed cs a” yeference 2 Becavse tf we pass valve ,-tnen Tr would made to all Copy constructor which becomes Ton=ten p U ie, eee cai es © Sar \ enyt "eeh2 Deep Copydeleten “an object, 3 DesHuctos don} Bake! vany= argument ond a ae Fave any yveturn type La ass 5 Only one destructor jg possible Bere yctor: mock) bet sen oat ea . bt a esters desivuctor — doean* destroy oblect ith) iene “test function “that “inioceaiuneerer object's al ey eh 5 es Resoura a Destructer 1% used, So that before deletion of bj we an free space lloaried for thia Yesoure. Ble ib ob) Oke deleted then Space Allocated for obj Wil be Free but resource Gocanit Operator Ouest Crt hove he ability to provide special meaning 4D jhe operator. i class Complex bay Me ewes Gopi operatar + (Complex Rei) a Gomplex ren yo t eZ. De ewes TBD = 62d je int main ©) 4 @ =a4crAs Sr" can't add Complex 70'S cea | 6 Cane define a fonction, “wit Tame le SP bod |__meed write operator Keyword beyjore Soy, weR" use” @ qn eperater Are this . oa Friend C\ass 2 . A Friend claga can access ane Privare ana PS C memberB. of other class | iM Which Tt is declared Friend. ‘* al “Were Ga be friend clase and friend function Ex: Class = BOK { } | 4 privere doable width ; 3 pobiie + Ve d > friend Void printidath (Box box)) Noid Serwidin¢ doble wWid)j lm y t 1oteas 2 Noid» Box + 2 -Setwidth (Box double Wid) 4 Width= wie; y > oe ! Nold print wien (Box box) >> S208 I 4 Govt
maind > x919n Bok Sb x Ho/onmeay & box Seti i at ( a); é Print Wicttn Cox) 5 eThhér tance SnD SAAE é. = = ae = S_praess of nhertvg “properties and & ‘i existin ata of ft Stee Seto an eae — Ygmeelass. . Bose_cloas Cr sa =i | es | iu ~. a 3 ee Car | Classi -Sporte sar /ti/Peblion Gr (5 = eh | Se No MPS § epany 5 = a “Types of Tneritance + cet q ; sildega: 38 a a. Single Inheritance : v wiv Sete cloas B + public A ate =) a 2 olor ai — a d WZ aaa 3 ES sb). Moitileve) Inheritance + Clase Bt Pubic A 8 ~ = reMyitiple “Inheritance nf ALT MOLAASS LAb. 29 closs AZ ad f di be lass Bt public Al, public AZ ae $3 A). Heirarchia\ © Inheritance Gless Bi: Poblte A 4 by ae pen EB BD Tor hee es Ce ms Ly t j > Nisibitt Mode A = bose loss B- Sub Cass A i3V3/ rh lop 2205F peblic member. Win be petit in @,. and will grotected . A a: e visibility, mode is Private thea both proteaed i] — wi goblicN member of A wil be Private “member qs) q 20hS) — =\8 a Relationship is alway “mplemented az 1a public An hertténce . Constructor and Destructor In —anheritonce First chia class constructor win tun during creation OF cbject Of child (else, bot Os Soon Ye obj 8 | Creared chi \d class = Gonstructor YUN | and 4 wil cal) TGnstiweror of 43 gent leas and After the eeat of arent dass constsuetes «= Tt) BEIMEe FH con eee | eecsttion , res porenr _construces call = eS Ga FAO) ©) nipry seni pri bid rsv0 bortsm\ fn case gi desesvetosyi: »D) Child destveltos exea 5 open “dese, executed, Pe SHS RYEa See Fi wa addre Every object tn crx hos accesza -to it own 8 hia pointer, ar On Amportant pointer aa\ied ie Lb ie inter, ee Friend function doean+ Nave a, “nis! a= iem| frends ave ot membern, of a cagg. ON fonerion have thin pelnter. fo ear Class Box Ss a7 s PriNate + 3 SFE z far Db K ; peslic x SNobdirsiser Cint Qristntesd, Smt hj oorreM 4 sne>2Q = 2; peas £0 Oy Ahlss bsnepy Th this > h YOAFENOS TT SET i Ant malin C) 4 rea Boe puna bi ee (No, H) Seber x Merned Over Riain HERS RAS — “achieved aks ton an dhe). l 235s x St the a vedefi rion oF 23D 2a ets base Css fy returnPrivate + Aa Qearno 7 pebltcy ~ Notd ehange-qear (Gnk gear) Ya “So of aS ere idle SLPS tau louRi rid > de SporigGr + Peblic Car bn 2) smit= signa Noid change-qearC Yn gear) e 4 HL tear > 55 oobd cael ola T z ear yy [ wood & aint min g Sorts Gor Boy c+ Change -qear (4) 5 tagCe, BOE Sigma a8 SN ital . Fonction? z A Nirtval fncrion ig a member function Which Vis __declaved with a ‘virtval Keyword!) i “me base and redec\ared Coverridden) %n a desived class. When You yefer 40 @ object of derived Clos Ushi poivrer to a base clasz, yo can call a virtual fons of hat object and execute, the derived clogs! Nersion of +e -fonction . + They are used to achieve Ron time — Poly morphism - + Nirwval Fonction Cannot be Static and also cannot be Amerion of anotner clogs. Comptie—time CEarly binding) Ve Run_sime Chote Gindi 7 S Gloss base " i public t ; Nirtval_veta print © 4 Gute “ This ie bose print” _ pail. ES ee ae ao Noid Show) 20 239 oe She B reBUb cen ft ee eee SSSI SbpiaG Swat“derived bptr x opty > rink 5 berry > svowd } 4 Compiie ime _ -oreean ond - Naxe Binding 4 ay binding. +302 deriwea! prints =: © “Wee Base Stow ‘tun during compiler Rime bptr behaviour jydged on bards of which cloap « fne function 1S Mot Virtval hen tt will ailow bindi compile time aha privy fun of obese “ctase wilt : binded b/c bprr mepresent baze closs, Bue at yun > +ime topae pois to tne. ce Ok cass devwed , So FH WIN b- bind “fendion Pe devived at Fun ime. Closs % belong, So bptr represnt 7 pod oireda W Working of Nivtual Function —CN\Tabte > 2 NP tr) a class cahraing Virtval function then Compiler tse Sintwe > ani lanes 5 ? i A Virvval~ pointer (ere) is. created every time _ created for thar class which Contains ray is caied \VTABLE © Where viel fonction \a. one dev\Ned Class,dune NPTR mea al Smit slign Pure Nirtval Function coibei S404 and Bbstract Class “Sometimes Amp\ementation of ai function nner fiw hem) basexvolaaz , Suen a.) Gass le canned drawO SD Bet there: cant B im pement=ten, ar (Shape [ D a eo oe [Evae | Aw pure virtual Hanetion oan css ie _sewhieh bo we don!+ have Re 4 Abstract Claas Gt9V 2 Clogs, ese leur Jo Veet vetieich a ~ Oo viral functia any “implementation, we 6 Hoitsnu7 Pubic: Nivtual vei fon piers 0 ASSAD pigs > Ac» cess ig 5 Gbstracn Re ate cee Bere S288 pure virtual > fonetion, maa _ : BRED: tolea “Sor 5 SA Fee aes e
You might also like
Notes CA403 Object Oriented Programming Using C Sybbaca
PDF
No ratings yet
Notes CA403 Object Oriented Programming Using C Sybbaca
49 pages
Abstract Class in C++
PDF
100% (1)
Abstract Class in C++
2 pages
PHP Lab Manual
PDF
No ratings yet
PHP Lab Manual
11 pages
5 Sem Lab Manual R Programming BCA-BSC
PDF
No ratings yet
5 Sem Lab Manual R Programming BCA-BSC
16 pages
Android Programming
PDF
No ratings yet
Android Programming
11 pages
UNIT 2 - OOPs
PDF
No ratings yet
UNIT 2 - OOPs
29 pages
Class and Objects:: Unit - 2
PDF
No ratings yet
Class and Objects:: Unit - 2
35 pages
ICMP Misbehaviour
PDF
100% (1)
ICMP Misbehaviour
34 pages
Access Modifiers in Java
PDF
No ratings yet
Access Modifiers in Java
5 pages
UNIT-2: Classes and Object, Dynamic Constructor & Destructor BCA-2 Sem
PDF
No ratings yet
UNIT-2: Classes and Object, Dynamic Constructor & Destructor BCA-2 Sem
40 pages
Assignment On Basics of Linux
PDF
No ratings yet
Assignment On Basics of Linux
14 pages
Student Record Project
PDF
No ratings yet
Student Record Project
39 pages
C Programming Notes
PDF
50% (2)
C Programming Notes
4 pages
C# Lab BCA III Sem-2
PDF
No ratings yet
C# Lab BCA III Sem-2
13 pages
PHP UNIT 3
PDF
No ratings yet
PHP UNIT 3
68 pages
Ii Bca Java Notes (3.5 Units)
PDF
No ratings yet
Ii Bca Java Notes (3.5 Units)
87 pages
Java Notes UNIT-1
PDF
No ratings yet
Java Notes UNIT-1
73 pages
4.CPU Scheduling and Algorithm-Notes
PDF
No ratings yet
4.CPU Scheduling and Algorithm-Notes
31 pages
List of Programs Subject Code: PCS-307 Subject: OOP Using C++ Programming Lab
PDF
No ratings yet
List of Programs Subject Code: PCS-307 Subject: OOP Using C++ Programming Lab
4 pages
DBMS Handwritten Notes-1
PDF
No ratings yet
DBMS Handwritten Notes-1
204 pages
OS Unit - 4 Notes
PDF
No ratings yet
OS Unit - 4 Notes
35 pages
Managing Errors and Exception
PDF
67% (3)
Managing Errors and Exception
12 pages
The Polish Notation (Application of Stacks)
PDF
No ratings yet
The Polish Notation (Application of Stacks)
23 pages
Python Quetion and Answers
PDF
No ratings yet
Python Quetion and Answers
5 pages
Assignment 6 Solution
PDF
No ratings yet
Assignment 6 Solution
14 pages
JAVA UNIT-2 Notes
PDF
No ratings yet
JAVA UNIT-2 Notes
21 pages
Unit-3 C++ Functions: 2140705 Object Oriented Programming With C++
PDF
No ratings yet
Unit-3 C++ Functions: 2140705 Object Oriented Programming With C++
52 pages
Pps Practical File
PDF
100% (1)
Pps Practical File
61 pages
Important Questions CPP
PDF
No ratings yet
Important Questions CPP
6 pages
Managing Input / Output Files in Java
PDF
100% (1)
Managing Input / Output Files in Java
63 pages
Tybca OOSE Notes
PDF
No ratings yet
Tybca OOSE Notes
49 pages
Android Practical List
PDF
No ratings yet
Android Practical List
1 page
Unit - I Introduction and Web Development Strategies
PDF
No ratings yet
Unit - I Introduction and Web Development Strategies
12 pages
DeadLock in Operating System
PDF
No ratings yet
DeadLock in Operating System
15 pages
BCA 4th Sem Operating System Unit 1 PPT Slides
PDF
No ratings yet
BCA 4th Sem Operating System Unit 1 PPT Slides
28 pages
COMPUTER ARCHITECTURE VIVA QUESTIONS
PDF
No ratings yet
COMPUTER ARCHITECTURE VIVA QUESTIONS
7 pages
Steps of Unix Os Installation
PDF
No ratings yet
Steps of Unix Os Installation
3 pages
THEORY FILE - Android Programming (6th sem) !!
PDF
No ratings yet
THEORY FILE - Android Programming (6th sem) !!
30 pages
Oops
PDF
No ratings yet
Oops
152 pages
CPP Hand Written Notes
PDF
100% (1)
CPP Hand Written Notes
55 pages
Web Application and Development: Lab Manual
PDF
No ratings yet
Web Application and Development: Lab Manual
52 pages
Computer Graphics (C-503) BCA V Semester Unit-1
PDF
No ratings yet
Computer Graphics (C-503) BCA V Semester Unit-1
11 pages
Basic Oops Interview Questions For Fresher: 2. What Is Object Oriented Programming?
PDF
No ratings yet
Basic Oops Interview Questions For Fresher: 2. What Is Object Oriented Programming?
12 pages
Unit 2 Information Security complete notes
PDF
No ratings yet
Unit 2 Information Security complete notes
84 pages
Decision Making and Looping
PDF
100% (2)
Decision Making and Looping
13 pages
Practical Programs 1. Write A Program To Find The Largest of Three Numbers Using If and Conditional Operator
PDF
No ratings yet
Practical Programs 1. Write A Program To Find The Largest of Three Numbers Using If and Conditional Operator
16 pages
Slicing and Indexing
PDF
No ratings yet
Slicing and Indexing
16 pages
Gujarat University Practical Examination December 2017 B.C.A. Semester - I Subject: CC-107 PC Software Set No: 6 Univ. Seat No
PDF
No ratings yet
Gujarat University Practical Examination December 2017 B.C.A. Semester - I Subject: CC-107 PC Software Set No: 6 Univ. Seat No
20 pages
C++ Tokens
PDF
No ratings yet
C++ Tokens
22 pages
Java Practical
PDF
No ratings yet
Java Practical
25 pages
Oops All Units
PDF
No ratings yet
Oops All Units
110 pages
File Access Methods in Operating System
PDF
No ratings yet
File Access Methods in Operating System
4 pages
Programming in C 2022 Question Paper
PDF
No ratings yet
Programming in C 2022 Question Paper
4 pages
Active Server Pages PDF
PDF
No ratings yet
Active Server Pages PDF
34 pages
Software Engineering SE Unit 2
PDF
No ratings yet
Software Engineering SE Unit 2
48 pages
OOPS Notes ? - Removed
PDF
No ratings yet
OOPS Notes ? - Removed
20 pages
Oops Notes Curated by Sameer Raza
PDF
No ratings yet
Oops Notes Curated by Sameer Raza
21 pages
Oop
PDF
No ratings yet
Oop
20 pages
Oops in c++ INTERVIEW ️SERIES -2 _
PDF
No ratings yet
Oops in c++ INTERVIEW ️SERIES -2 _
24 pages
C++ Hand Written Notes
PDF
No ratings yet
C++ Hand Written Notes
15 pages
Python Interview Questions Compressed
PDF
No ratings yet
Python Interview Questions Compressed
5 pages
Infosys Materials
PDF
No ratings yet
Infosys Materials
182 pages
Infosys - Aptitude-Model Papers - 1473177928759
PDF
No ratings yet
Infosys - Aptitude-Model Papers - 1473177928759
25 pages
Infosys Expected Questions (Bonus Set 1)
PDF
No ratings yet
Infosys Expected Questions (Bonus Set 1)
34 pages
Infosys-10th March and 11th March-Latest
PDF
No ratings yet
Infosys-10th March and 11th March-Latest
61 pages
Infi Crack
PDF
No ratings yet
Infi Crack
2 pages