Suggested Projects


Skill-Building Exercises

  1. Study The UML:   Obtain a reference on the Unified Modeling Language (UML) and conduct further research on how to model complex associations and aggregations using class diagrams. Also study how to express complex event sequences using sequence diagrams.

  2. Obtain a UML Modeling Tool:   If you haven’t already done so procure a UML modeling tool to help you draw class and sequence diagrams.

  3. Research the Typesafe Enumeration Pattern:   Conduct a web search to learn more about the use of the typesafe enumeration pattern.

  4. Discover Dependency Relationships:   Study the Java Platform API. Write down at least five instances where one class depends on the services of another class. Describe the nature of the dependency and explain the possible effects changing the depended-upon class might have on the dependent class.

  5. Programming Exercise — Demonstrate Simple Aggregation:   Write a program that implements the simple aggregation shown in figure 10-15.

    image from book
    Figure 10-15: Simple Aggregation Class Diagram

    Hints: Implement the printMessage() method in ServerClass to print a short message of your choosing to the console. You’ll need to write a test driver program to test your code. Study examples 10.1 through 10.3 for clues on how to implement this exercise.

  6. Programming Exercise — Demonstrate Composite Aggregation:   Write a program that implements the composite aggregation shown in figure 10-16.

    image from book
    Figure 10-16: Composite Aggregation Class Diagram

    Hints: Implement the printMessage() method in ServerClass to print a short message of your choosing to the console. You’ll need to write a test driver program to test your code. Study examples 10.4 through 10.6 for clues on how to implement this exercise.

  7. Compile Multiple Source Files:   Find the aircraft project simulator project source code presented in this chapter on the supplemental CD-ROM. Use the javac compiler tool to compile all the source files in the project directory using the ‘*’ wildcard character.




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