November 2002
Intermediate to advanced
240 pages
5h 9m
English
The thought struck us at the end of Chapter 6: what happens when we compare Francs with Dollars? We dutifully turned our dreadful thought into an item on our to-do list. But we just can’t get it out of our heads. What does happen?
public void testEquality() { assertTrue(new Dollar(5).equals(new Dollar(5))); assertFalse(new Dollar(5).equals(new Dollar(6))); assertTrue(new Franc(5).equals(new Franc(5))); assertFalse(new Franc(5).equals(new ...