in the text "head first object-oriented analysis and design" a flawed design is presented:
The partial solution is presented in the form of suggested amendments and criticisms:
I was wondering whether anyone might be able to offer a complete UML solution to this exercise, since I found the solution presented mysterious and incomplete.
I also had a questions regarding advice the book gives:
The annotation on picture 2 suggests that "orderCone(IcreCream[], Topping[]) : Cone" and "orderSundae(IceCream[], Topping[], Syrup[]): Sundae" be replaced by "orderDesert() : Desert". This i agree with and had in my solution. However I would expect it to have a "Desert" type as its paramter, as in: "orderDesert(Desert) : Desert", since this is surely required to supply the relevant implementation class (sundae or cone). The books seems to suggest otherwise. Can I ask for your feedback on this?
Aucun commentaire:
Enregistrer un commentaire