There are two common programming methods:
- Procedural programming
- Object-oriented programming (OOP)
A program in a
In a procedural
Lastly, it does not model the
- C++is known as the extension of C because it contains the features of OOPS.
- OOPS stands for
Object-Oriented Programming.It offers a real-worldrelationship.
- It is a programming paradigm based on the concept of OBJECTS that contains data and methods.
- It offers a new and powerful way to cope up with
bug easy to maintain and reusable programs. , free
The difference between Object-Oriented Programming(OOPS) and procedural programming are :
The basic concept of OOPS
Before the discussion of the basic
An object is an identifiable piece of code with some characteristics and behavior. Just look around you, the book you are reading, the pen.
You are writing with are all objects.
A class is a group of objects that share common properties and relationships. For example, fruits
Features of Object-Oriented Programming(OOPS)
It is defined as the act of representing essential features without including background details.
It is the most fundamental concept in oops. The wrapping up of data and operations/functions (that operates on data) into a single unit (called class) is known as encapsulation. A class describes encapsulation.
Abstraction and Encapsulation are complementary concepts. Encapsulation is a way to implement data abstraction. You will understand more about it in classes
Modularity is the property of a syste that has been decomposed into a set of cohesive and loosely coupled modules. It is required in a program because
- It reduces program complexity to some degree.
- It creates a number of well- defined, documented boundaries within the program.
Let us take the example of a computer system. The music system comprises speakers, monitors, printers,
It is defined as the capability of one class of things to inherit capabilities or properties from another class.
It is defined as the ability for a message or data to be processed in more than one form.
ADVANTAGES OF OOPS
- Re-use of code.
- Ease of comprehension.
- Ease of fabrication and maintenance.
- Easy redesign and extension.
DISADVANTAGES OF OOPS
- With OOPs, classes tend to be overly generalized.
- The relations among classes become artificial at times.
- The OOP program design is tricky.
- To program with OOP, The
programmerneeds proper skills, thinking, etc.
Hope so, you would like my post, Please follow me onÂ my profile @priya123 to get latest post Developed by me.