080230004 - Object Oriented Programming
Basic Concepts of OOPS
Before starting to learn C++ it is essential that one must have a basic knowledge of the
concepts of Object Oriented Programming.
Some of the important object oriented features are namely:
In order to understand the basic concepts in C++, the programmer must have a command of
the basic terminology in object-oriented programming. Below is a brief outline of the concepts of
Object-oriented programming languages:
Object is the basic unit of object-oriented programming. Objects are identified by its unique
name. An object represents a particular instance of a class. There can be more than one instance of
an object. Each instance of an object can hold its own relevant data. An Object is a collection of
data members and associated member functions also known as methods.
Classes are data types based on which objects are created. Objects with similar properties and
methods are grouped together to form a Class. Thus a Class represents a set of individual objects.
Characteristics of an object are represented in a class as Properties (Attributes). The actions that
can be performed by objects become functions of the class and are referred to as Methods
For example consider we have a Class of Cars under which Santro Xing, Alto and
WaganR represents individual Objects. In this context each Car Object will have its own,
Model, Year of Manufacture, Colour, Top Speed, Engine Power etc., which form
Properties of the Car class and the associated actions i.e., object functions like Start,
Move, Stop form the Methods of Car Class.
No memory is allocated when a class is created. Memory is allocated only when an object is
created, i.e., when an instance of a class is created.
Inheritance is the process of forming a new class from an existing class or base class. The
base class is also known as parent class or super class. The new class that is formed is called
derived class. Derived class is also known as a child class or sub class. Inheritance helps in
reducing the overall code size of the program, which is an important concept in object-oriented
Data Abstraction increases the power of programming language by creating user defined data
types. Data Abstraction also represents the needed information in the program without presenting
Dept of IT