I was creating and discussing a class diagram with a partner of mine. To simplify things, I've modify the real domain we're working on and made up the following diagram:
Basically, a company works on constructions that are quite different one from each other but are still constructions. Note I've added one field for each class but there should be many more.
Now, I thought this was the way to go but my partner told me that if in the future new construction classes appear we would have to modify the Company class, which is correct. So the new proposed class diagram would be this:
Now I've been wondering:
- Should the fact that in no place of the application will there be mixed lists of planes and bridges affect the design in any way?
- When we have to list only planes for a company, how are we supposed to distinguish them from the other elements in the list without checking for their class names?
- Related to the previous question, is it correct to assume that this type of diagram should be high-level and this is something it shouldn't matter at this stage but rather be thought and decided at implementation time?
Any comment will be appreciated.