10.13 Problems

 < Day Day Up > 



10.13 Problems

  1. The MoveController object in both the Composition and Classification programs cannot be used with procedural programs such as the MoveObjects in Program 7.5d. Why? Suggest modifications to the class so that the MoveController object's move method can be used with either procedural or concurrent programs.

  2. Show that all of the problems with using classification identified in Sections 10.8 and 10.9 are a result of the classification design increasing coupling and decreasing cohesion relative to the composition design.

  3. All of the Java AWT components (Button, TextField, etc.) are created by extending class Component and many also extend Container. Discuss the relative merits of this design, especially considering whether or not the Component class and Container classes are utility classes with respect to the AWT components. Also, consider the behavior of some components, such as adding a Layout Manager or component to a JFrame, and the methods that are overridden in the various classes. Is the design of the Java AWT a good one?

  4. Compare the animator control panel in Chapter 7 with the control panel in Chapter 9. Show that the one in Chapter 9 is superior using the arguments of cohesion and coupling.

  5. Applying the concepts of coupling and cohesion, discuss the relative merits of the design of the Java AWT. By these criteria, is the design of the AWT a good one?



 < Day Day Up > 



Creating Components. Object Oriented, Concurrent, and Distributed Computing in Java
The .NET Developers Guide to Directory Services Programming
ISBN: 849314992
EAN: 2147483647
Year: 2003
Pages: 162

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