GGK Tech interview question

some design patterns, Singleton, factory, decorator.