Encapsulation is a key concept of object programming that ensures the autonomy and integrity of the objects. A simple example is two classes that inherit from a common parent and implement the same virtual method.Įncapsulation is the ability that an object has to contain and restrict access to its members. In object-oriented programming, polymorphism (from the Greek meaning "having multiple forms") is the characteristic of being able to assign a different meaning to a particular symbol or "operator" in different contexts. Polymorphism is about an object's ability to provide context when methods or operators are called on the object. This characteristic leads to the creation of families of objects (just like families exist for humans) with parent objects and child objects. Inheritance is the ability of an object to inherit the properties and methods of another object. Q9) What are the core ABAP oops concepts? Want to represent real-time objects of a class, enroll in our SAP OOPS ABAP Training The concept revolves around making simulation programs around an object. Objects are said to be the most important part of an object-oriented language. Simula is the first object-oriented language. Q8) What is an object-oriented programming language?Īns: An object-oriented programming language allows concepts such as abstraction, modularity, encapsulation, polymorphism, and inheritance. For example, a car is an aggregation of the engine, tires, brakes, etc.Īggregation represents a "Has" relationship like a car has an engine. Aggregation is the composition of an object out of a set of parts. Q7) What is Aggregation?Īns: An aggregation is a special form of association. Q6) What is Method Overloading?Īns: Method overloading is in a class have many methods having the same name but different parameters called overloading or static polymorphism. This means that when overriding a method the subclass method has to have the same name and parameter list as the super class's overridden method. Q5) What is Method Overriding?Īns: Method overriding allows a subclass to override a specific implementation of a method that is already provided by one of its superclasses.Ī subclass can give its own definition of methods but need to have the same signature as the method in its superclass. The new classes, known as derived classes, inherit attributes and behaviour of the pre-existing classes, which are referred to as base classes. Inheritance is intended to help reuse existing code with little or no modification. Q3) How can polymorphism be implemented?Īns: In OOPs terminology, inheritance is a way to form new classes using classes that have already been defined. Whereas an object is an actual instance of a Class. Q2) What is the difference between Class and Object?Īns: A-Class is actually a blueprint or a template to create an Object. The end of this section contains a list of further reading, with a selection of titles about object orientation. In subsequent sections, it goes on to discuss in more detail how these terms are used in ABAP Objects. This documentation introduces a selection of terms that are used universally in object orientation and also occur in ABAP Objects. SAP OOPS ABAP Interview Questions and Answers Q1) What is OOPS ABAP?Īns: Object orientation (OO), or to be more precise, object-oriented programming, is a problem-solving method in which the software solution reflects objects in the real world.Ī comprehensive introduction to object orientation as a whole would go far beyond the limits of this introduction to ABAP Objects.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |