revised 11/27/98; 2/14/99; 01/24/00; 07/27/02; 06/04/03

CHAPTER 50 — Inheritance

All object oriented languages have a feature called inheritance. Inheritance enables you to define a new class based upon an existing class. The new class is similar to the existing class, but has additional member variables and methods. This makes programming easier because you can build upon an existing class instead of starting out from scratch.

Inheritance (and other features of object oriented languages) is responsible for the enormous success of modern software. Programmers are able to build upon previous work and continuously improve and upgrade software. For example, in programming graphical user interfaces, the visual components are customized by using inheritance with collection of basic components. You don't need to write the code for the basic components.

Chapter Topics:

This chapter discusses the syntax and semantics of inheritance using some simple examples. The next chapter continues the discussion using some larger examples.

QUESTION 1:

Couldn't you get the features of inheritance by copying source code and modifying it?