attention@computerscienceexpertise.com
Concept of OOP
o OOP stands for Object Oriented
Programming. It is the latest trend in
programming languages supported by C++
and Java and has had the revolutionary
success in the race of OOP. The limitations
of the Procedure Oriented Programming
(POP) languages, have given place to the
development of the OOP.
PDF created with pdfFactory Pro trial version www.pdffactory.com
attention@computerscienceexpertise.com
CLASSES & OBJECTS
o Object :
o An object is an identifiable entity with some characteristic andbehaviour.
o Class :
o A Class is a group of objects that share common properties and
relationships.
o The Objects are variables of type Class eg.
o If animal has been defined as a Class, then the statement;
o animal dog;
o will create an Object featuring dog belonging to the class animal.
PDF created with pdfFactory Pro trial version www.pdffactory.com
attention@computerscienceexpertise.com
Features of OOP
o Abstraction refers to the act of representing essential features without
including the background details or explanations.
o Encapsulation is an act of wrapping up of data and methods into a single
unit (called class). It is one of the most fundamental concepts of the Object
Oriented programming. The very insulation of the data from direct access
by the program is termed as Data Hiding. Encapsulation, is hence, just a
way to implement Abstraction.
o Inheritance is the process by which objects of one class acquire the
properties of objects of another class. This further provides animportant
extension to the idea of reusability. i.e. a particular programmer can make
use of an existing class and without any further modifications, add
additional features and capabilities to it, by deriving a new class from the
existing one, through inheritance.
o Polymorphism is the capacity to allow objects having different internal
structures to share the same external interface. It is the ability for a
message or data to be processed in more than one form.
PDF created with pdfFactory Pro trial version www.pdffactory.com