O'Reilly logo

Sams Teach Yourself Object Oriented Programming in 21 Days, Second Edition by Anthony Sintes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 12. Advanced Design Patterns

In yesterday’s chapter, you saw how design patterns allow you to reuse time-tested designs. Today, you will continue your study of design patterns by examining three more patterns.

Today you will learn

  • About three important design patterns

  • How to make sure that your objects remain single

  • How to enhance a previous example

  • About some common pattern pitfalls that you should avoid

More Patterns by Example

Let’s continue your study of design patterns by considering three important patterns:

  • Abstract Factory

  • Singleton

  • Typesafe Enum

Each of these patterns find their way into almost every design. In fact, you can use the Typesafe Enum pattern to fix up an example from Chapter 3, “Encapsulation: Time to Write Code!”

The Abstract ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required