jeudi 3 février 2022

State Pattern and Observer Pattern how are they used?

I have a program that implements the State Pattern and a State Machine. I am wondering should I be using the Observer Pattern to track the current state of the machine for logging purposes? IE The Parent Class State is an observable and each concrete class DerivedState implements its own notify function?

Aucun commentaire:

Enregistrer un commentaire