Question 5 Flashcards
What are the benefits of specialisation and generalisation
Any changes made to the generalisation will follow down to the specialisations and will only need to be carried out once
What is the difference between communication and sequence diagrams?
The two show the same information. The time ordering of messages is clear in a sequence diagram time passes by as you travel down the page. Some form of numbering is needed in a communication diagram to show the time ordering of messages and the numbering can become complicated.
What does GRASP stand for?
General responsibility assignment software patterns
Grasp expert
Assigns responsibility to a class that has the information necessary to fulfil that responsibility.
Grasp creator
To assign responsibility for creating objects
Law of Demeter
Each unit should have only limited knowledge about other units: only units “closely” related to the current unit.
Each unit should only talk to its friends; don’t talk to strangers.
Only talk to your immediate friends.
The fundamental notion is that a given object should assume as little as possible about the structure or properties of anything else (including its subcomponents), in accordance with the principle of “information hiding”.