Now we have the test, let's implement the code

public class Money { 
  // ... all the previous code 
  public boolean equals(Object anObject) {
    if (anObject instanceof Money) {
        Money aMoney= (Money)anObject;
        return aMoney.currency().equals(currency())
            & & amount() == aMoney.amount();
    }
    return false;
}


previous | start | next .... [Slide 7] ....