Pergunta de entrevista da empresa McKesson

Briefly describe singleton and factory design pattern