References


Self-Test Questions

1. 

What are the three essential purposes of inheritance?

image from book

2. 

What is meant by the term engineering trade-off?

image from book

3. 

List at least three benefits provided by inheritance.

image from book

4. 

What’s the purpose of an interface?

 - an interface specifies type behavior.

5. 

What’s the difference between an interface and an abstract class?

 - an abstract class may provide an implementation to one or more of its methods.

6. 

Why is compositional design considered to be a force multiplier?

 - it combines the power of interfaces, inheritance, and polymorphism

7. 

What is meant by the term polymorphism?

 - to treat different objects in a uniform way

8. 

How much design is good enough?

image from book

9. 

What is the fundamental unit of modularity in an object-oriented program?

image from book

10. 

What are the five checkpoints of Coad’s Criteria?

image from book

Answers

1. 

- as a way to reason about program behavior; as a way to incrementally build program functionality; as a way to gain a measure of reuse within your program

2. 

- Compromise in order to make progress while at the same time taking every practical measure to ensure design goals are achieved

3. 

- as a way to reason about program behavior; as a way to incrementally build program functionality; as a way to gain a measure of reuse within your program

4. 

- An interface specifies type behavior.

5. 

- An abstract class may provide an implementation to one or more of its methods.

6. 

- It combines the power of interfaces, inheritance, and polymorphism

7. 

- To treat different objects in a uniform way

8. 

- The answer to the question of when a design has reached “good enough” is always the same — it depends. It depends on the application’s intended purpose and its associated requirements.

9. 

- the class

10. 

  1. The derived class models an “is a special kind of,” relationship to the base class not an “is a role played by a” relationship. (view)

  2. The derived class never needs to transmute to be an object in some other class. (view)

  3. The derived class extends rather than overrides or nullifies the base class. (functional, uneffecting)

  4. The baseclass is not merely a utility class representing functionality you would simply like to reuse. (constant, machine)

  5. The inheritance hierarchy you are trying to build represents special kinds of roles, transactions, or devices within the application domain.




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