CITATION(shoneill @ Dec 17 2008, 05:31 PM)
I use to say that the class diagram has to be as close as possible to the real world. It make the development more intuitive and the code more comprehensible. I this case, I had a class "houseplan" that is composed of "stairs", and "stairs" are composed of "room". A particular room is the "staircase" (inheritance). On walls of the "room", you can find "openings" that can be "door" or "window (inheritance and polymorphism). After that I wonder what I need to know for each element. The houseplan attribute is its scale. For "room" and "openings", attributs are position and dimention. Then I wonder what I want to do with these elements. I want to save, load, draw, move... them. Here are the methods of each class...
Yann