Example implementation of GOF patterns