Object Oriented Abap Interview Questions & Answers: What Is Oops Abap ?
Object Oriented Abap Interview Questions & Answers: What Is Oops Abap ?
Method Overriding
Method Overloading
Operator Overloading
What is Inheritance ?
A subclass can give its own definition of methods but need to have the same signature as
the method in its super class. This means that when overriding a method the
subclass's method has to have the same name and parameter list as the super class's
overridden method.
Method overloading is in a class have many methods having same name but different
parameter called overloading or static polymorphism
What is Aggregation ?
Definition: Polymorphism
Definition: Encapsulation
Encapsulation: Encapsulation is the ability that an object has to contain and restrict the
access to its members. Encapsulation is a key concept of object programming that
ensures the autonomy and integrity of the objects.
Abstraction: Another OOPS concept related to encapsulation that is less widely used but
gaining ground is abstraction.
Definition: Abstraction
Through the process of abstraction, a programmer hides all but the relevant data about
an object in order to reduce complexity and increase efficiency. In the same way that
abstraction sometimes works in art, the object that remains is a representation of
the original, with unwanted detail omitted. The resulting object itself can be referred
to as an abstraction, meaning a named entity made up of selected attributes and
behavior specific to a particular usage of the originating entity.
What is UML ?
UML does not describe the steps in the object-oriented development process.
UML describes a number of different diagram types in order to represent different views
of a system.
In general there are two types of Objects: Instance Object and Static Object and as such
there are two types of Classes: Instance class and Static Class. Specifically when it
comes to visibility, Private class, Protected class and Public classes are the types of
classes one can have.
We can create four types of classes under final and only modeled category(optional) with
the private, protected, public and abstract instantiation.
Persistent Class.
Persistent Class.
Objects can only be created and addressed using reference variables. Reference
variables allow you to create and address objects. Reference variables can be defined
in classes, allowing you to access objects from within a class.
Objects can only be created and addressed using reference variables. Reference
variables allow you to create and address objects. Reference variables can be defined
in classes, allowing you to access objects from within a class.
Abstract method
Abstract instance methods are used to specify particular interfaces for subclasses,
without having to immediately provide implementation for them. Abstract methods
need to be redefined and thereby implemented in the subclass (here you also need
to include the corresponding redefinition statement in the DEFINITION part of the
subclass). Classes with at least one abstract method are themselves abstract. Static
methods and constructors cannot be abstract (they cannot be redefined).
Abstract (instance) methods are defined in the class, but not implemented
For SAP Technical Tips and Solutions please visit http://www.sapyard.com/
They must be redefined in subclasses.
The widening cast is, as with inheritance, the opposite of the narrowing cast: Here it is
used to retrieve a class reference from an interface reference.
What is a singleton ?
In inheritance, static components are "shared": A class shares its non-private static
attributes with all its subclasses. => and -> are the component selectors used to
refer.
A component instance is a running component that can be run in parallel with other
instances of the same component.
BADI - Business Add Ins are enhancements to the standard version of the code of SAP.
Filter Badi- Business Add-Ins may be implemented on the basis of a filter value. If an
enhancement for country-specific versions is provided for in the standard version, it
is likely that different partners will want to implement this enhancement. The
individual countries can create and activate their own implementation.
a. Global
b. Local Exceptions Class.
Protected components Only visible within the class and its sub classes.
Methods have a parameter interface (called signature ) that enables them to receive
values when they are called and pass values back to the calling program.
CLASS DEFINITION. ... METHODS: [ IMPORTING TYPE EXPORTING TYPE CHANGING TYPE
RETURNING VALUE() TYPE EXCEPTIONS RAISING ]. ENDCLASS.(signature of a
method). CLASS IMPLEMENTATION. METHOD . ... ENDMETHOD. ENDCLASS.
Methods that have a RETURNING parameter are described as functional methods. These
methods cannot have EXPORTING or CHANGING parameters, but has many (or as
few) IMPORTING parameters and exceptions as required.
Yes, class can be created without any constructor. Default constructor will be created
when we define a class without constructor.