Login :
Password :

Design patterns

Complete collaboration between concrete colleagues

Static diagram :

Static diagram

Strong points :

  1. 1. Extensibility
    1. KO 1.1 Decoupled colleagues
    2. KO 1.2 Mediator's protocol factorization
  2. 2. Simplified management
    1. KO 2.1 Simplified object protocols
    2. KO 2.2 Minimal number of exchanged messages

Spoiled pattern instantiations on different problems

Problem 1 :

Problem wording :
Design the communications of one plane to the approach of an airport. When a plane is in approach of the airport, it must announce to all the other planes which are around that it intends to be posed, and await their confirmation with all before carrying out the operation. It is the control tower of the airport which guarantees the regulation of the air traffic, by making sure that there is no trajectory conflict or destination between several planes. Besides the class diagram, represent by a collaboration (diagram of collaboration or diagram of objects and sequence) the landing of a plane among two wanting to land and one wanting to take off.
Optimal solution :

Static diagram :

Static diagram

Collaboration diagram :

Collaboration diagram

The collaboration diagram is needed to correctly illustrate the messages.

Alternative solution :

Static diagram :

Static diagram

Collaboration diagram :

Collaboration diagram

The concrete mediator that is represented by the control tower is not used.

Les têtes de mule
Cédric BOUHOURS
Cédric BOUHOURS
Cédric BOUHOURS