Pregunta de entrevista de EXFO

how singleton and factory design patterns work?