OOPs Notes
OOPs Notes
be/OQ0En1dQ3zI
Course Link: https://www.knowledgegate.in/learn/Mera-Placement-Hoga
Subscribe our Youtube Channel for Coding & Placement Videos: https://www.youtube.com/c/KGPlacementPrep
Join our Free Whatsapp Group for CODING Practice & Job Updates: https://linktr.ee/KgPlacementWA
Share Link of this PDF to friends, this will motivate us: http://tiny.cc/OOPs
• Objects have state and behaviour
Eg: Dogs have state (name, colour, breed, hungry) and behaviour
(barking, fetching, wagging tail).
• An object stores its state in fields (or in variables) and exposes its
behaviour through methods.
Share Link of this PDF to friends, this will motivate us: http://tiny.cc/OOPs
Watch video of this PDF: https://youtu.be/OQ0En1dQ3zI
Code Link: https://onlinegdb.com/3bxjXPjGi
Subscribe our Youtube Channel for Coding & Placement Videos: https://www.youtube.com/c/KGPlacementPrep
How to create an object ?
Join our Free Whatsapp Group for CODING Practice & Job Updates: https://linktr.ee/KgPlacementWA
Encapsulation is defined as the wrapping up of data under a single unit.
It is the mechanism that binds together code and the data it
manipulates. Another way to think about encapsulation is, it is a
protective shield that prevents the data from being accessed by the code
outside this shield.
Share Link of this PDF to friends, this will motivate us: http://tiny.cc/OOPs
Watch video of this PDF: https://youtu.be/OQ0En1dQ3zI
Code Link: https://onlinegdb.com/JVvfLlNB1p
Subscribe our Youtube Channel for Coding & Placement Videos: https://www.youtube.com/c/KGPlacementPrep
Code Link: https://onlinegdb.com/3iLwksjQZ
Join our Free Whatsapp Group for CODING Practice & Job Updates: https://linktr.ee/KgPlacementWA
Share Link of this PDF to friends, this will motivate us: http://tiny.cc/OOPs
Code Link: https://onlinegdb.com/3iLwksjQZ
Consider a real life example of a man driving a car. The man only knows that
pressing the accelerators will increase the speed of car or applying brakes will stop
the car but he does not know about how on pressing accelerator the speed is
actually increasing, he does not know about the inner mechanism of the car or the
implementation of accelerator, brakes etc in the car. This is what abstraction is.
Share Link of this PDF to friends, this will motivate us: http://tiny.cc/OOPs
Watch video of this PDF: https://youtu.be/OQ0En1dQ3zI
Course Link: https://www.knowledgegate.in/learn/Mera-Placement-Hoga
Subscribe our Youtube Channel for Coding & Placement Videos: https://www.youtube.com/c/KGPlacementPrep
Join our Free Whatsapp Group for CODING Practice & Job Updates: https://linktr.ee/KgPlacementWA
Code Link: https://onlinegdb.com/3iLwksjQZ
Share Link of this PDF to friends, this will motivate us: http://tiny.cc/OOPs
The word polymorphism means having many forms. In simple words, we can
define polymorphism as the ability of a message to be displayed in more than
one form.
Share Link of this PDF to friends, this will motivate us: http://tiny.cc/OOPs
Watch video of this PDF: https://youtu.be/OQ0En1dQ3zI
Code Link: https://onlinegdb.com/EN3AorR8x