01 / 07
Two classes that are nearly the same
Say you have written a class for a member. It holds a name, and it can greet you.
Now you want to add a premium member. It holds a name and it greets exactly as a member does. The only difference is that postage is free.
Write a second class out in full for that and the same contents sit in two places. Fix one, forget the other, and now they disagree — that is the part that bites.