FIS interview question

write code for observer pattern