
10.2 Inheritance Design 667
constructor is running. Similarly, when we construct the c2 object, the
BankAccount overloaded constructor runs, then we print a message from
the CheckingAccount overloaded constructor.
Table 10.2 summarizes the inheritance rules for constructors.
10.2.3 Adding Specialization to the Subclass
At this point, our CheckingAccount class provides no more functionality
than the BankAccount class. But our purpose for defining a CheckingAc-
count class was to provide support for a specialized type of bank account.
To add specialization to our CheckingAccount subclass, we define new fields
and methods. For example, we can define a