Abstract Classes
Abstract classes represent intangible entities. Object-oriented applications should model the real world, which is full of intangible concepts. For example, a geometric shape is a concept. Have you even seen a geometric shape? No. Rather, you have seen specific shapes, such as triangles, ellipses, rectangles, and lines. Geometric shape is a description of an intangible concept —a kind of shape. Conversely, a rectangle is tangible: a television, a box, and this book are actual rectangles.
The Employee class presented in this section is an abstract class. Why? Employee is not tangible. You do not hire a generic employee. Instead, you hire a specific kind of employee: an hourly, salaried, or commissioned employee. The Employee class ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access