Page 77 - Modular_V2.0_C++_Flikpbook
P. 77
7
OOP CONCEPTS
Your Aim
to learn about:
Object-Oriented Programming
Principles of OOP
Earlier, some procedural programming languages, also known as Procedure-Oriented
Programming (POP) languages, were used for application development. These languages followed
a top-down approach, meaning that the statements in a program were executed sequentially,
line by line, from top to bottom. Some examples of procedural programming languages are
FORTRAN, COBOL, ALGOL, BASIC, C and PASCAL.
The programs written in procedural programming languages are made up of procedures also
known as routines or functions. These programs are harder to write and often not reusable.
Procedural programming languages are best suited for general-purpose programming, but
unable to relate real-world objects. To overcome the problems with procedural programming
languages, the concept of the Object-Oriented Programming (OOP) came into picture.
OBJECT-ORIENTED PROGRAMMING
Object-Oriented Programming (OOP) is a programming paradigm that focuses on objects rather
than routines or functions. The primary purpose of object-oriented programming is to break
down a large problem into smaller, more manageable parts. It is easier to solve a problem by
dividing it into smaller subproblems rather than tackling it as a whole.
As you may know, C++ is an object-oriented programming language. Other examples of object-
oriented programming languages include Java, PHP, C#, and Python.
Object-oriented programming is based on two fundamental elements: objects and classes. These
are the core components of an object-oriented programming language. Let us explore these
concepts in detail.
Object
An object is a real-world entity like car, dog, pencil and computer. All real-world entities have
properties and behaviour. Properties represent the physical appearance and qualities of an
object. On the other hand, behaviour represents the functions or actions that an object can
perform.
75
OOP Concepts

