Nilessh Ganu wrote:If my system doen't makes any difference if the Animal is Cat or Dog or Elephant to define the behavior, can we use only a class like Animal with a properties in it having animalType/animalName ?
...
So is it allowed to exclude the domain objects listed in the requirement and use a generic type instead in the class diagram?
As I recall, one participant in the forum
assumed it was OK to go to town with the Composite pattern for the sake of efficiency/elegance, and he failed. The evaluator described this simplified diagram as "catastrophically incomplete".
For this reason, if you face a choice between
(a) improving the assigned domain model
OR
(b) making assumptions that allow you to work with the assigned domain model as it stands
it might be wise to do (b) and not (a)! The class diagram should closely reflect the provided domain model.