Design Patterns: Factory

Please see my other Design Pattern articles. Providing flexible object-instantiation. In this example, I’ll illustrate a method by which a SalesAssociate object may be instantiated that is more flexible than the traditional way – using a constructor. Instead I’ll implement a factory design pattern to create the instance. There are two advantages to this approach:…

Design Patterns: Adapter

Please see my other Design Pattern articles. Exposing class behavior from another class. Sometimes you might need to access and use functionality defined from one class from within your own class. To illustrate this pattern, I’ll begin with a simple class that contains one method I wish to invoke from within my other class –…