Page 69 - Modular_V1.1_Flipbook
P. 69
07 OOP CONCEPTS
Your Aim
to learn about:
Object-Oriented Programming
Principles of OOP
Earlier, some procedural programming languages or Procedure-Oriented Programming (POP)
languages were used to develop applications. These languages were following a top-down
approach which means the statements of a program were executed line by line in top-down
manner. 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 is a programming paradigm that focuses on objects instead of
routines or functions. The main purpose of object-oriented programming is to divide a large
problem into smaller problems. It is easy to solve a problem by diving it into the small problems
instead of solving the large problem. As you know, C++ is an object-oriented programming
language. Some other examples of object-oriented programming are Java, PHP, C# and Python.
The object-oriented programming is based on object and class. These are the main elements of
an object-oriented programming language. Let us learn about the object and class in detail.
Object
An object is a real-world entity like car, dog, pencil and computer. All the 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 that an object can perform. For
example, a dog has some properties like colour, breed, hairs, ear, etc. and behaviour like barking,
eating, sleeping, etc.
OOP Concepts 67

