What is OOPs?
- OOPS, the standard form is Object Oriented Programming Structure.
- It is one of the ways of solving complex problem into the smaller problem by using objects.
- Before using OOPS, programs were written in procedural language i.e. C language, they were nothing but a long list of instructions.
- If declare global variable then all function known that value because of the global variable is public so anyone can access i.e. here not possible the particular function only knowns the global value and data are not secure.
- But, in the c++ program having and managing objects and classes in C++, the program key building block is Data. Therefore, secure data is tightly using access specifiers, classes, encapsulation, and so on.
- In C++, Dynamic Memory allocation and deallocation become simpler just by the use of ' new' and 'delete' keyword. Where in C, you have to use alloc ,calloc and malloc functions for dynamic memory allocation.
Uses of oops or why it used?
- Reducing program lines.
- Data secure.
- Easy way to find errors.
- Execution speed is fast.
Features of oops in c++:
- Class and object
- Methods or function
- Constructor
- Encapsulation
- Abstraction
- Polymorphism
- Inheritance
- Interfaces
- Destructor
Each feature learns deeply.
No comments:
Post a Comment