This is an example of how the pattern Observer should be used . It was taken from the internet , and just copied.