Suggested Projects


Skill-Building Exercises

  1. Java API Drill:   Browse through the Java API and look for classes that contain static class methods or fields. Note how they are being used in each class.

  2. Problem Abstraction Drill:   Revisit the robot rat project presented in chapter 3. Study the project specification and identify candidate classes. Make a table of the classes and list their names along with a description of their potential fields and functionality. Try not to be influenced by the solution approach taken in chapter 3. Instead, focus on breaking the problem into potential classes and assigning functionality to those classes. For example, the program written in chapter 3 is included in one large application class. At a minimum you will want to have a separate application class. Draw a UML diagram to express your design.

  3. Problem Abstraction Drill:   Consider the problem of modeling the functionality of an automobile in code. Create a list of candidate classes and include potential fields and methods. Draw a UML diagram to express your design.

  4. Problem Abstraction Drill:   Consider the problem of modeling the functionality of an airplane in code. Create a list of candidate classes and include potential fields and methods. Draw a UML diagram to express your design.

  5. Problem Abstraction Drill:   Consider the problem of modeling the functionality of a nuclear submarine. Create a list of candidate classes and include potential fields and methods. Draw a UML diagram to express your design.

  6. Further Research:   Research the topic of data encapsulation. The goal of your research should be to understand the role design plays in determining the level of data encapsulation and what design and programming strategies you can use to enforce data encapsulation.

  7. Coding Exercise:   Write a program that lets you experiment with the effects of method parameter passing. The names of the class and any fields and methods required are left to your discretion. The idea is to create a class that contains several primitive and reference fields. It should also contain several methods that return primitive types and references. Write a method that takes at least one primitive type and one reference type parameter. Practice calling the method using a combination of fields, methods, and the new operator. Manipulate the parameters in the body of the method and note the results.

  8. Problem Abstraction Drill:   Consider the problem of modeling the functionality of a computer in code. Create a list of candidate classes and include potential fields and methods. Draw a UML diagram to express your design.

  9. Problem Abstraction Drill:   Consider the problem of modeling the functionality of a coffee maker. Create a list of candidate classes and include potential fields and methods. Draw a UML diagram to express your design.

  10. Problem Abstraction Drill:   Consider the problem of modeling the functionality of a gas pump. Create a list of candidate classes and include potential fields and methods. Draw a UML diagram to express your design.




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