Online Book Reader

Home Category

Think In JAVA (the third edition) [9]

By Root 16022 0
presents tools to solve the problems that the compiler doesn’t. One of the biggest steps forward is the incorporation of automated unit testing. For this book, a custom testing system was developed to ensure the correctness of the program output, but the defacto standard JUnit testing system is also introduced. Automatic building is implemented with the open-source standard Ant tool, and for teamwork, the basics of CVS are explained. For problem reporting at run time, this chapter introduces the Java assertion mechanism (shown here used with Design by Contract), the logging API, debuggers, profilers, and even doclets (which can help discover problems in source code).

Chapter 16: Analysis & Design

The object-oriented paradigm is a new and different way of thinking about programming, and many people have trouble at first knowing how to approach an OOP project. Once you understand the concept of an object, and as you learn to think more in an object-oriented style, you can begin to create “good” designs that take advantage of all the benefits that OOP has to offer. This chapter introduces the ideas of analysis, design, and some ways to approach the problems of developing good object-oriented programs in a reasonable amount of time. Topics include Unified Modeling Language (UML) diagrams and associated methodology, use cases, Class-Responsibility-Collaboration (CRC) cards, iterative development, Extreme Programming (XP), ways to develop and evolve reusable code, and strategies for transition to object-oriented programming.

Appendix A: Passing & Returning Objects

Since the only way you talk to objects in Java is through references, the concepts of passing an object into a method and returning an object from a method have some interesting consequences. This appendix explains what you need to know to manage objects when you’re moving in and out of methods, and also shows the String class, which uses a different approach to the problem.

Appendix B: Java Programming Guidelines

This appendix contains suggestions that I have discovered and collected over the years to help guide you while performing low-level program design and writing code.

Appendix C: Supplements

Descriptions of additional learning material available from MindView:

1. The CD ROM that’s in the back of this book, which contains the Foundations for Java seminar-on-CD, to prepare you for this book.

2. The Hands-On Java CD ROM, 3rd Edition, available at www.MindView.net. A seminar-on-CD that’s based on the material in this book.

3. The Thinking in Java Seminar. The MindView, Inc., main introductory seminar based on the material in this book. Schedule and registration pages can be found at www.MindView.net.

4. Thinking in Enterprise Java, a book that covers more advanced Java topics appropriate to enterprise programming. Available at www.MindView.net.

5. The J2EE Seminar. Introduces you to the practical development of real-world, Web-enabled, distributed applications with Java. See www.MindView.net.

6. Designing Objects & Systems Seminar. Object-oriented analysis, design, and implementation techniques. See www.MindView.net.

7. Thinking in Patterns (with Java), which covers more advanced Java topics on design patterns and problem-solving techniques. Available at www.MindView.net.

8. Thinking in Patterns Seminar. A live seminar based on the above book. Schedule and registration pages can be found at www.MindView.net.

9. Design Consulting and Reviews. Assistance to help keep your project in good shape.

Appendix D: Resources

A list of some of the Java books I’ve found particularly useful.

Exercises

I’ve discovered that simple exercises are exceptionally useful to complete a student’s understanding during a seminar, so you’ll find a set at the end of each chapter.

Most exercises are designed to be easy enough that they can be finished in a reasonable amount of time in a classroom situation while the instructor observes, making sure that all the students are absorbing the material. Some are more challenging, but none present major

Return Main Page Previous Page Next Page

®Online Book Reader