Java observer pattern example

Observer pattern is used to observe the change of an object and update all related objects that is related to this changed object. In this example, gold is the object to observe, when the gold amount changes, the currency value also changes.