Suggested Projects


Skill-Building Exercises

  1. Further Research:   Obtain Meyer’s book (listed in the references section) and read the chapters related to inheritance.

  2. 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)

  3. Further Research:   Obtain Martin’s book (listed in the references section) and read the chapter on designing the employee payroll system.

  4. Programming:   Compile and execute the example code listed in this chapter.

  5. UML Drill:   Create a UML sequence diagram of the main() method of the MainTestApp class given in example 22.9.

  6. 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.

  7. Further Research:   Explore the topic of Access Control Graphs.

  8. 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     }

    1. 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?

    2. What types of inheritance forms are applied in this example?

  1. 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?

  2. 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?




Java For Artists(c) The Art, Philosophy, and Science of Object-Oriented Programming
Java For Artists: The Art, Philosophy, And Science Of Object-Oriented Programming
ISBN: 1932504052
EAN: 2147483647
Year: 2007
Pages: 452

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net