In this post we will go through all the theoretical concepts of Object Oriented Programming methodology.

The main feature of Object Oriented programming is to  represent real-time objects in the form of class.

Encapsulation: In OOPs methodology, Encapsulation is way to bind data and functions together. These functions can manipulate the data, and keeps both safe from outside interference and misuse. Through data encapsulation we achieve an important OOPs concept of data hiding.

Polymorphism: It means using one thing for different operations. This works along with inheritance. Polymorphism means redefining methods to either overload them or to override them. Method overloading is a way to use the same method name with different number of parameters whereas method overriding is a way to use the same method name and parameters for different functionality, but the two methods are related via inheritance.

Abstraction: Data abstraction is a way to expose only the interfaces and hiding the implementation details from the user. Technically, Abstract Class is a special kind of class which can not be instantiated. We can only instantiate the subclasses of the Abstract class if they are not abstract. Abstract class should at least contain one abstract method. Abstract methods can only be declared and can not have an implementation.

Inheritance: Inheritance allows us to derive new classes from existing classes. This makes it easier to maintain an application, to reuse the code and to reduce the implementation time.

Narrowing Cast: Assigning the instance of the Subclass to the instance of the Superclass is called as Narrowing Cast. Also called as Up Casting.

Widening Cast: Assigning  the instance of the Superclass to the Subclass is called as Widening Cast. Also called as Down Casting.

Class: It is a user defined data type with attributes, methods, events, user-defined types and interfaces needed for a business application.

Attributes: These are variables, internal tables, work areas and constants declared within a class.

Events: In ABAP Objects, triggering and handling an event means that certain methods act as triggers and trigger events, to which other methods – the handlers – react. This means that the handler methods are executed when the event occurs. Event can be raised by event handler method which is declared in same/another class.

Methods: Methods are similar to function modules and responsible to perform certain task. They can access all the attributes of their own class. They are defined in the class definition section and implemented in the Implementation section. Methods are called using “CALL METHOD” statement.

Interface: Interfaces can only have method definitions. Implementation is done in the implemented classes. These can be used by any number of classes to extend the scope of the functionality. Each class can have its own implementation of interface methods depending upon the class functionalities. The declaration of interface does not include the visibility section. But in the declaration part of a class, they must be listed under Public Section.

    Categories: Abapooabap

    1 Comment

    Google Sites · August 10, 2022 at 10:13 am

    Are you writing the articles in your website yourself or you outsource them?
    I am a blogger and having difficulty with content. Other bloggers
    told me I should use an AI content writer, they are actually pretty good.
    Here is a sample article some bloggers shared with me.
    Please let me know what your opinion on it and should I go ahead and use AI – https://sites.google.com/view/best-ai-content-writing-tools/home

    Comments are closed.