emids interview question

Design patters explain