Computer Science, asked by adarshchaubey5597, 1 year ago

Advantages of object oriented programming over earlier programming methodologies.

Answers

Answered by Anonymous
4

Procedural programming are structural programming languages which executed the code sequentially depending on the instruction received through some subroutine and function calls.Languages like C,cobol are procedural language.

While OOP brings the concept of class which is a collection of data and methods that relies on the operation of object.The concept of class and object brings the dynamicness within a code and most importantly make the code reusable unlike procedural language.Languages like SystemVerilog,java and C++ uses the concept of OOP.

The major advantage of using OOP are:-

Introduces concept of Inheritance which is useful in extending the properties of base class into child class along with its existing methods which increases code reusability and minimises code length.

Introduces the concept of Encapsulation which is a data hiding property within a class so that a particular data member can remain private.

Introduces polymorphism concept using virtual methods which is useful in overriding class properties and methods.

Introduces abstract class concept which is just a placeholder for a class and object can not be created out of it and the use of it comes in task and function call.

Introduces shallow copy,deep copy and object copy concept which are missing in procedural language.

Introduces multiple Inheritance and composition concept where a single child class can inherit the properties of more than one class at the same time which helps in tremendous reduction of code and minimises debugging effort within a code.

Introduces concept of observer pattern so that if a particular object within a class got modified then extended data member which is dependent on that object gets updated without any further modification of the code.

The concept of OOP related features brings the idea of Reusability,dynamic nature,inter communication within the blocks,multithreading,etc which are missing in procedural language.

Similar questions