|Home • Trainings • Quiz • Tips • Tutorials • Functional • Cert Q's • Interview Q's • Jobs • Testimonials • Advertise • Contact Us|
Understanding the concepts of Object Oriented Programming
Attributes of Object Oriented
Inheritance is the concept of adopting the features from the parent and reusing them . It involves passing the behavior of a class to another class. You can use an existing class to derive a new class. Derived classes inherit the data and methods of the super class. However, they can overwrite existing methods, and also add new ones.
Inheritance is of two types: Single Inheritance and Multiple Inheritance
Single Inheriting: Acquiring the properties from a single parent. (Children can be more).
Example for Single Inheritance
Multiple inheritance: Acquiring the properties from more than one parent.
Syntax : CLASS <subclass> DEFINITION INHERITING FROM <superclass>.
Let us see a very simple example for creating subclass(child) from a superclass(parent)
Multiple Inheritance is not supported by ABAP.
Output is as follows :
Everything is visualized in terms of classes and objects.
wrapping up of data and methods into a single unit (called class) is known as
Encapsulation. The data is not accessible to the outside world only those
methods, which are wrapped in the class, can access it.
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM
©2006-2007 SAPTechnical.COM. All rights reserved.
product names are trademarks of their respective companies. SAPTechnical.COM
is in no way affiliated with SAP AG.
Graphic Design by Round the Bend Wizards