Morgan Stanley interview question

What are the design patterns and how to create singleton class.