Python-Programming-Day4
Object Oriented Programming System(OOPS)
Object-Oriented Programming(OOP), is all about creating “objects”.
An object is a group of interrelated variables and functions. These variables are often referred to as properties of the object and functions are referred to as the behavior of the objects. These objects provide a better and clear structure for the program.
For example
Get PratikMurlidharYadav’s stories in your inbox
Join Medium for free to get updates from this writer.
a car can be an object. If we consider the car as an object then its variables/properties would be — its color, its model, its price, its brand, etc. And its function/behavior would be acceleration, slowing down, gear change.
Object-Oriented Programming (OOP) vs Procedure Oriented Programming (POP)
The basic difference between OOP and procedural programming is-
One way to think about POP is the same way you make lemonade for
example,
The procedure of making lemonade involves-
first taking water according to the need,
then adding sugar to the water,
then adding lemon juice to the mixture,
and finally mixing the whole solution.
And your lemonade is ready to serve.
In a similar way, POP requires a certain procedure of steps.
A procedural program consists of functions.
This means that in the POP approach the program is divided into functions, which are specific to different tasks.
These functions are arranged in a specific sequence and the control of the program flows sequentially.






