You may assume for now that negative money amounts are allowed.
You may assume different attributes (e.g. internally, you may just keep track of total cents), as long as the methods behave as specified.
Here is a partial solution based on our demo and discussion in class: MoneyTest.java and Money.java; missing are: second test for testComplexAdd (see bottom of MoneyTest.java), tests and implementations of subtract and compareTo.
The compareTo method compares two Money objects: the one that invokes the method and the one received as parameter, and returns
0 if the two Money amounts are the same,
-1 if this Money object represents an amount less than that received as parameter, or
1 if this Money object represents an amount greater than that received as parameter.