Tuesday, February 17, 2015
Basic concepts of OOP
The object oriented programming has been developed with a view to overcome the drawbacks of conventional programming approaches. The OOP approach is based on certain concepts that help it attain its goal of overcoming the drawbacks of shortcomings of conventional programming approaches. These general concepts of OOP are given below:
Also Read: How to write and run c/c++ programs in Ubuntu
Also Read: Complete guide to run any program from this blog
Also Read: How to write and run c/c++ programs in Ubuntu
1. Data Abstraction
Abstraction refers to the act of representing special features without including the background details or explanation.
2. Encapsulation
The wrapping up of data and operations/functions (that operate on the data) into a single unit (called class) is known as encapsulation.
3. Modularity
Modularity is a property of a system that has been decomposed into a set of cohesive and loosely coupled modules.
4. Inheritance
Inheritance is the capability of one class of things to inherit capabilities or properties of another class.
5. Polymorphism
Polymorphism is the ability for a message or data to be processed in more than one form.
Also Read: Complete guide to run any program from this blog
Advantages of OOP
- It models real world well.
- With OOP, programs are easy to understand.
- OOP offers classes reusability. Already created classes can be reused without having to write them again.
- OOP facilitates Quick Development as parallel development of classes is possible.
- With OOP, programs are easier to test manage and maintain.
Disadvantages of OOP
- With OOP, classes tend be overly generalised.
- The relations among classes become artificial at times.
- The OOP programs design is tricky.
- Also one needs to do proper planning and proper design for OOP programming.
- To program with OOP, programmer need proper skills such as design skills, programming skills, thinking in terms of objects etc.
Source: Text Book: C++ Sumita Arora
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.