Login :
Password :

Design patterns

Store the movements of a graphic object

Problem wording :

Without breaking the encapsulation, design a system to memorize the movements of a graphic object.

Optimal solution :

Diagramme de classe :

Diagramme de classe

Storing the state of the graphic object using the flag makes it possible to preserve the encapsulation.

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