Exercises using JUnit

  1. Design and implement MoneyTest and Money. Use the test-first approach, as we discussed, and document each method before implementing.
    Money
    - dollars : int
    - cents : int
    + Money (int, int)
    + getDollars()
    + getCents()
    + add (Money) : Money
    + subtract (Money) : Money
    + toString() : String
    + equals (Money) : boolean
    + compareTo (Money) : int