Tag Archives: decorator

Varying behavior of individual objects : Decorator Design Pattern

Let’s take a look at a class for a Baseball player. In this example I made it an abstract class but it could just as well have been an interface for this discussion. 1 2 3 4 public abstract class Player { public abstract void swing(); } } And here is an implementation class. 1 [...]

Posted in Design Patterns | Also tagged | Leave a comment