Q. Discuss the concept of OOPs.
Ans.:- The key concept of OOPs are as follows:-
1.Class:-It is a group of objects that have identical properties,common behaviour and shared relationship.Using class,the entire group of data and code of an object can be built as user define types.Once a class has been declared,programmer can create number of objects associated to that class.
2.Object:-It is an instance of class.Every object has its own properties or features.They are primary run-time entities in object-oriented programming.It also occupies space in memory.It is a perfect data item for a class which it belongs.
3.Data Abstraction:-It is the procedure of identifying properties and methods related to a specific entity as applicable to the application.It directs to the procedure of representing essential feature only.
4.Encapsulation:-The packing of data and functions into a single component is known as encapsulation.With encapsulation,we can accomplish data hiding.Data hiding is the much valued feature and an object can be used even if the user does not know how it works internally.
5.Inheritance:-It is a method in which object of one class get the properties of objects of another class.It is the features that permits the reuse of an existing class to make a new class.The new class will have the combined features of both the classes.
6.Polymorphism:-It is made up of two greek word 'poly' and 'morphism'.Poly means many and morphism means forms.It allows the same function to act differently in different classes.Typically,polymorphism occurs when there is a hierarchy of classes and they are related by inheritance.
7.Dynamic Binding:-It is also known as late binding or run-time binding.The code present in the specified program is unknown till it is executed.It is analogous to inheritance and polymorphism.It is used to connect one program to another program that is to be executed.
8.Message Passing:-A message for an object is the demand for implementation of its characteristics.In object-oriented programming,the objects include and communicate with each other.A message contains name of the member function and parameters of the function.
No comments:
Post a Comment