Apiture Interview Question

Write the observer pattern in any language.