15 Design Patterns
When designing a program, it is useful to understand the ways that people have organized programs in the past, since these approaches might speed up the design process or lead to a better program in the end. This chapter discusses a number of such design patterns .1 Each pattern provides a benefit: some patterns improve performance, while others make it easier to change the program in certain ways.
In this book we have already used several design patterns. One is the iterator pattern. As explained in Chapter 6, we use iterators as a basic part of our methodology since it allows us to provide efficient access to elements of collection objects without either violating encapsulation or complicating the abstraction. Another is ...
Get Program Development in Java: Abstraction, Specification, and Object-Oriented Design now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.