Deloitte Interview Question

factory and singleton design pattern