$5 + 10 CHF = $10 if rate is 2:1$5 * 2 = $10Make “amount” privateDollar side effects?Money rounding?equals()hashCode()Equal nullEqual object5 CHF * 2 = 10 CHFDollar/Franc duplicationCommon equalsCommon timesCompare Francs to DollarsCurrency?Delete testFrancMultiplication?
What is there on our to-do list that might help us to eliminate those pesky useless subclasses? What would happen if we introduced the notion of currency?
How do we want to implement currencies at the moment? I blew it, again. Before the ruler comes out, I'll rephrase: How do we want to test for currencies at the moment? There. Knuckles saved, for the moment.
We may want to have complicated objects representing currencies, with flyweight ...