Comparing Dollar's with Dollar's.

Dollar.times() returns an object of Dollar, so we can compare Dollar with Dollar because we want to make amount variable private.