vendredi 26 février 2016

what kind of design pattern should be used in this example?

An inexperienced developer created the following object model. Adding new instruments turned out to be complicated with this design, because the space shuttle needs to know all the instruments. It updates their states by explicitly invoking the appropriate methods (e.g. updateXY() in GPS). Every new instrument requires changing the SpaceShuttle class. Improve this design using a design pattern. Draw a UML class diagram to explain your improved design.

class Diagram

Aucun commentaire:

Enregistrer un commentaire