Singleton pattern sample code added

Signed-off-by: Vishnu <vishnu.garg@shephertz.co.in>