Capital One interview question

Design patterns.