Intuit interview question

singleton pattern & factory pattern