Tuesday, 31 May 2016

Object Orientation



Definitions of Some object Oriented Concepts ( Terms ).

  • Encapsulation :
  1. Objects 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 outside 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 from the attributes and the services are known as methods.
  3. Encapsulation is supported through Classes.
  4. Global Class is an ABAP object which can be accessed via SAP Class Builder, T-code for SAP Class Builder is SE24.
  5. Local classes are classes that 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 is specific to a particular class.
  4. Method overwriting: Same method name with the same signature can exist in 2 or more classes.
  5. Method overloading: Inside the class, 2 or more methods can have the same but different signatures.
  • Inheritance :
  1. We can use an existing class to drive a new class. Derived classes inherit the data and methods of the superclass.
  2. However, they can overwrite existing methods, and also add new ones.
Object-Oriented Approach - key features
  • Better Programming Structure.
  • Real-world entities can be modeled very well.
  • Stress on data security and access.
  • Reduction in code redundancy.
  • Data encapsulation and abstraction.
                             more information..................


No comments:

Post a Comment