© 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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.