Object Orientation


Definitions of Some object Oriented Concepts ( Terms ).

  • Encapsulation :
  1. Object restrict the visibility of their resources (attributes and methods ) to other users.
  2. Every object has an interface , which determines how other objects can interact with it.
  3. The implementation of the object is encapsulated , that is , invisible out side the object itself.

  • Classes :
  1. Class is a section of source code that contains data and provides services into a Single Unit.
  2. The data form the attributes and the services are know as methods.
  3. Encapsulation is supported through Classes.
  4. Global Class is an ABAP object which can be accessible via SAP Class Builder, T-code for SAP Class Builder is SE24.
  5. Local classes are classes which are available in ABAP programs, we can access them via ABAP editor SE38.

  • Objects :
  1. From a technical point of view objects are run-time instances of a class.
  2. We can create any number of objects based on a single class.
  3. Each instance(object) of a class has a unique identity and its own set of values for its attributes.
  • Polymorphism :
  1. Identical ( identically-named ) methods behave differently in different classes.
  2. object oriented programming contains constructions called interfaces. They enable you to address methods with the same name in different objects.
  3. Although the form of address is always the same , the implementation of the method id specific to a particular class.
  4. Method overwriting : Same method name with same signature can exit in 2 or more classes.
  5. Method overloading : Inside the class , 2 or more methods can have same but different signature.
  • Inheritance :
  1. We can use an existing class to drive a new class. Derived classes inherit the data and methods of the super class.
  2. However, they can overwrite existing methods , and also add new ones.
Object Oriented Approach - key features
  • Better Programming Structure.
  • Real world entity can be modeled very well.
  • Stress on data security and access.
  • Reduction in code redundancy.
  • Data encapsulation and abstraction.

Comments

Popular posts from this blog

RADIO-BUTTONS IN BASIC REPORT

ALV-LIGHT_SET