Further Research: Obtain Meyer’s book (listed in the references section) and read the chapters related to inheritance.
Further Research: Obtain Coad’s book (listed in the references section) and read the section that talks about the five inheritance checkpoints. (Coad’s Criteria)
Further Research: Obtain Martin’s book (listed in the references section) and read the chapter on designing the employee payroll system.
Programming: Compile and execute the example code listed in this chapter.
UML Drill: Create a UML sequence diagram of the main() method of the MainTestApp class given in example 22.9.
Applied Object-Oriented Theory: Evaluate the Aircraft Engine Simulation code given in chapter 11 from the standpoint of Meyer’s Inheritance Taxonomy and Coad’s Criteria.
Further Research: Explore the topic of Access Control Graphs.
Applied Polymorphism: Consider the following interface and class definitions then answer the following questions:
1 public interface IFoo { 2 void a(); 3 void b(); 4 }
1 public class Bar implements IFoo { 2 public void a(){ } 3 public void b(){ } 4 public void c(){ } 5 public void d(){ } 6 }
What methods can be called without casting if a reference of type IFoo is declared and initialized to point to an object of type Bar?
What types of inheritance forms are applied in this example?
Identify Inheritance Form: Consider the following code:
1 public class BaseClass { 2 public void f(){ System.out.println("Hello from BaseClass f()!"); } 3 }
1 public class DerivedClass extends BaseClass { 2 public void f() { System.out.println("Hello from DerivedClass f()!; } 3 }
What type of inheritance form is applied in this example?
Identify Inheritance Form: If a functional linked-list is extended to create a new type of data structure, what type of inheritance form is being applied?