O'Reilly logo

Object-Oriented Design with ABAP: A Practical Approach by James E. McDonough

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© James E. McDonough 2017

James E. McDonough, Object-Oriented Design with ABAP, 10.1007/978-1-4842-2838-8_5

5. Inheritance

James E. McDonough

(1)Pennington, New Jersey, USA

The next stop on our journey to Objectropolis takes us from Abstraction to a place called Inheritance.

Let’s return to Table 4-3 (from the previous chapter) to describe the relationship between the abstraction levels for Enclosed shape, Enclosed shape with at least one angle, and Rectangle, shown again here in Table 5-1.

Table 5-1. Summary of the Members of the Three Classes

Classes

Enclosed shape

Enclosed shape with at least one angle

Rectangle

Attributes

area

perimeter

area

perimeter

smallest angle

area

perimeter

smallest angle

hypotenuse

Behaviors

getArea

getPerimeter

getArea

getPerimeter ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required