Skip to main content

Inheritance

  • Chapter
  • First Online:
Object-Oriented Design with ABAP
  • 1384 Accesses

Abstract

The next stop on your journey to Objectropolis takes you from Abstraction to a place called Inheritance.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    See www.ctp.bilkent.edu.tr/~russell/java/LectureNotes/10_Inheritance.htm .

  2. 2.

    We will see a more formal method by which to establish this inheritance relationship in diagrams in the chapter covering the Unified Modeling Language.

  3. 3.

    Although the Internet is full of discussion threads on the topic of whether or not static methods can be or should be able to be overridden, it seems that none of the more common object-oriented languages providing a static realm support this capability.

  4. 4.

    As we will see later, the Singleton design pattern is an example of a class marked as final.

  5. 5.

    Technically, a child class inherits everything from its parent class, but those members defined in the parent class with private visibility will not be visible to the child class.

  6. 6.

    As we shall see later, a reference variable does not always need to be associated with a type of class, but for now we will keep it simple and limit the discussion to class references.

  7. 7.

    Steve McConnell, Code Complete: A practical handbook of software construction, 2nd edition, Microsoft Press, 2004, p. 92

  8. 8.

    We will cover the technique of composition in more detail in the section on Design Patterns.

  9. 9.

    Shallow inheritance hierarchies avoid what is known as the yo-yo problem.

  10. 10.

    There are many tales of programmers having created deep inheritance structures that became unmanageable during subsequent maintenance cycles; this may account for why it has fallen out of favor among scholars.

  11. 11.

    See “The diamond problem” section at www.geeksforgeeks.org/multiple-inheritance-in-c/ .

  12. 12.

    Preceding entries paraphrased from www.astronoo.com/en/gould-belt.html .

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2017 James E. McDonough

About this chapter

Cite this chapter

McDonough, J.E. (2017). Inheritance. In: Object-Oriented Design with ABAP. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-2838-8_5

Download citation

Publish with us

Policies and ethics