public boolean equals(Object object) { if (object instanceof Money) { Money otherMoney = (Money) object; return (cents == otherMoney.getCents()); } return false; }
public void subtract(Money otherMoney) { cents -= otherMoney.getCents(); }
public boolean greaterThan(Money otherMoney) { if (cents > otherMoney.getCents()) { return true; } return false; }
public void add(Money otherMoney) { cents += otherMoney.getCents(); }