Inheritance defines “is-a” hierarchy among classes in which one subclass inherits from one or more generalised superclasses. If a class shares the structure or behaviour from multiple classes, then it is called Multiple Inheritance. Inheritance is a relationship among classes, wherein one class shares the structure or behaviour defined in another class. Encapsulation helps to separate the contractual interface of an abstraction and implementation. Abstraction is one of the fundamental elements of the object model.Įncapsulation is the process of compartmentalising the elements of an abtraction that defines the structure and behaviour. Its the process of focussing on the essential characteristics of an object. Abstraction provides crisply-defined conceptual boundaries relative to the perspective of the viewer. An instance is also called as an object.Ībstraction, Encapsulation,Inheritance and Polymorphism are the core OOP’s conceptsĪbstraction defines the essential characteristics of an object that distinguish it from all other kinds of objects. The structure and behaviour of similar classes are defined in their common class. It is also called as an instance of a classĪn instance has state, behaviour and identity. Each object is an instance of a class and each class belong to a hierarchy.Ĭlass is a template for a set of objects that share a common structure and a common behaviour. OOP is a method of programming in which programs are organised as cooperative collections of objects. 1.2K OOPS Interview Questions and Answers What is meant by Object Oriented Programming?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |