OOP or Object Oriented Programming
OOP is one kind of programming style. This article describes basic overview of OOP. Summary of the article:
- What is OOP?
- What are the basic features of OOP?
- What is Abstraction?
- What is Encapsulation?
- What is Polymorphism?
- What is Inheritance?
What is OOP?
OOP or Object Oriented Programming is one kind of programming system where programs are considered as a collection of objects. Object is an instance of a class.
OOP or Object Oriented Programming is one kind of programming system where programs are considered as a collection of objects. Object is an instance of a class.
What are the basic Features of OOP?
OOp has four basic features. Following are the four basic features of Object Oriented Programming or OOP:
OOp has four basic features. Following are the four basic features of Object Oriented Programming or OOP:
- Abstraction – process of showing only the relevant and essential information to the users without showing unnecessary information.
- Polymorphism – process of allowing an entity to multiple forms.
- Encapsulation – process of protecting unwanted access of information.
- Inheritance – process of reusability of code. It eliminates the use of redundant code. In this system child class can obtained all the features of parent class. Parent class is called based class and the child class is called derived class.
What is Abstraction?
Abstraction is a process of showing only the relevant and essential information to the users without showing unnecessary information. It is one of the most important principles in Object Oriented Programming and is closely related to several other important elements like encapsulation, inheritance and polymorphism.
The abstraction principle is generally used to reduce complexity and allow efficient design and implementation of complex software systems in the computer science and software engineering area. The abstraction principle is also applied in some areas of software design and implementation such programming languages (mainly in object-oriented programming languages), specification languages, control abstraction, data abstraction and the architecture of software systems.
Abstraction is a process of showing only the relevant and essential information to the users without showing unnecessary information. It is one of the most important principles in Object Oriented Programming and is closely related to several other important elements like encapsulation, inheritance and polymorphism.
The abstraction principle is generally used to reduce complexity and allow efficient design and implementation of complex software systems in the computer science and software engineering area. The abstraction principle is also applied in some areas of software design and implementation such programming languages (mainly in object-oriented programming languages), specification languages, control abstraction, data abstraction and the architecture of software systems.
What is Encapsulation?
Encapsulation is a process of protecting unwanted access of information. It is an attribute of an object. It determines the access level for data in a class. Access modifiers determine the scope of the method or variables that can be accessed from other various objects or classes. There are 5 types of access modifiers, and they are as follows:
Encapsulation is a process of protecting unwanted access of information. It is an attribute of an object. It determines the access level for data in a class. Access modifiers determine the scope of the method or variables that can be accessed from other various objects or classes. There are 5 types of access modifiers, and they are as follows:
- Public: Used in based or derived class.
- Privet: Only used inside the class.
- Protected: Only used inside the class. But can be used in derived class
- Internal: Not used outside the assembly.
- Protected Internal: Not used outside the assembly. But can be used in derived class of another assembly
What is Polymorphism?
Polymorphism is a process of allowing an entity to multiple forms.
The word polymorphism comes from Greek and it means having multiple forms. This is one of the essential concepts of object oriented programming. Inheritance is related to class but polymorphism is related to object methods.
Polymorphism is a process of allowing an entity to multiple forms.
The word polymorphism comes from Greek and it means having multiple forms. This is one of the essential concepts of object oriented programming. Inheritance is related to class but polymorphism is related to object methods.
What is Inheritance?
Inheritance is a process of reusability of code. It eliminates the use of redundant code. In this system child class can obtained all the features of parent class. Parent class is called based class and the child class is called derived class.
Inheritance is a process of reusability of code. It eliminates the use of redundant code. In this system child class can obtained all the features of parent class. Parent class is called based class and the child class is called derived class.
That’s all about Object Oriented Programming(OOP).
No comments