McKesson interview question

Briefly describe singleton and factory design pattern