November 2002
Intermediate to advanced
240 pages
5h 9m
English
It’s a new day, and our to-do list has become a bit cluttered, so we’ll copy the pending items to a fresh list. (I like physically copying to-do items to a new list. If there are lots of little items, I tend just to take care of them rather than copy them. Little stuff that otherwise might build up gets taken care of just because I’m lazy. Play to your strengths.)
I’m not sure how to write the story of the whole addition, so we’ll start with a simpler example: $5 + $5 = $10.
public void testSimpleAddition() {
Money sum= Money.dollar(5).plus(Money.dollar(5));
assertEquals(Money.dollar(10), sum);
}
We could ...