Amazon interview question

Explain Factory method and singleton design