Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1. Method Overriding
2. Method Overloading
3. Operator Overloading
14.What is Inheritance ?
In OOPs terminology, inheritance is a way to form new classes using classes that have
already been defined. Inheritance is intended to help reuse existing code with little or no
modification. The new classes, known as derived classes, inherit attributes and behavior of
the pre-existing classes, which are referred to as base classes.
17.What is Aggregation ?
Aggregation is a special form of association. Aggregation is the composition of an object out
of a set of parts. For example, a car is an aggregation of engine, tyres, brakes, etc.
Aggregation represents a “Has” relationship like a car has a engine.
18.What is object oriented programming language ?
Object oriented programming language allows concepts such as abstraction, modularity,
encapsulation, polymorphism and inheritance. Simula is the first object oriented language.
Objects are said to be the most important part of object oriented language. Concept
revolves around making simulation programs around an object.
23.What is UML ?
UML (Unified Modeling Language) is a standardized modeling language. It is used for the
specification, construction, visualization and documentation of models for software systems and
enables uniform communication between various users.
UML does not describe the steps in the object-oriented development process.
SAP uses UML as the company-wide standard for object-oriented modeling.
UML describes a number of different diagram types in order to represent different views of a
system.
24.What are the types of Objects and Classes ?
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.
33.What is a singleton ?
If it is to be impossible to instantiate a class more than once (for example, because it serves
as a data administrator or data container), you can use the singleton concept. The class is
defined with the addition CREATE PRIVATE and FINAL and instantiated using its static
constructor. A public static component could then make the reference to the class available
to an external user.
47.What Is The Difference Between Singleton And Static Class In Sap Abap ?
Before going to static classes, you should understand static components.
Static Components: Static components (static attributes, static events and static methods) exists
globally, no need to create object/instance of the class to access them, we can access them by
using static component selector => .
Static Class: A class that only contains static components and no instance components is
referred to as a static class.
Singleton Class: It is a class which does not allow you to create multiple instances.
48.Can We Make Methods Of Interface As Abstract And Final In Ooabap ?
No we can not make interface methods as abstract or final in Object Oriented ABAP
Constructor: This method is executed automatically whenever object is created, this is used to
set default values with respect to instance/object. The name of the constructor method is
CONSTRUCTOR.
Static Constructor: This method is executed automatically whenever object is created, this is
used to set default values globally irrespective of instances/objects.The name of the static
constructor is CLASS_ CONSTRUCTOR.
62.What Is A Polymorphism In Ooabap ?
Polymorphism is a concept by which the same method names will behave differently in
different classes i.e each method will have it’s own implementation in different classes but
with the same name.
65.What Is Alias?
Instead of specifying full name of interface methods, we can assign it a name which can
directly trigger.
66.What Is Me Variable?
It just like a selfreference, by this we can call methods that are with in same class with out
creating object.
For example take one static method with an exporting parameter inside private class and
write object creation code in that static method and export that object.