© 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 ...

Get Object-Oriented Design with ABAP: A Practical Approach now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.