Closed keni7385 closed 5 years ago
First of all, we would like to apologize for the delay of the answer: we wanted to effectively picture the usage of the weapons before getting back to you in order to be more concrete with our reply.
EffectType
enumeration
, as it was not a good design idea. In regards to the WeaponType
and PowerupType
enumerations
, we agree with you that they could be replaced with a hierarchical structure, and we were using some inheritance-based structures at first sight. However, when we showed our diagrams to a tutor, he answered that a type attribute would have been better to make everything simpler, since there were no differences between the child classes but the type, and (from his opinion) a casting would have been worst. Thank you for your help. Let us know if there are other adjustments to make.
We discussed during the class of 05-07, okay now
I have reviewed your UML diagrams.
enum
s, such asEffectType
,WeaponType
andPowerupType
, that are used actually as "type". This doesn't follow the OOP principles. If a label is used to distinguish among different behaviors in the code (maybe through aswitch
), could mean that a hierarchical structure is missing in the design.Please fix these problems ASAP.