Cognizant interview question

Design patterns, Spring