State

Encapsulate interchaneabvle behaviours and use delegation to decide which behaviour to use
Allows an object to alter its state behaviour when its internal state changes
The object will appear to change its class.
This allows an object to have many different behaviours that are based on its internal state.


Encapsulates state based behaviours and uses delegation to switch between behaviours
The state is represented as a full blown class




© 2023 Better Solutions Limited. All Rights Reserved. © 2023 Better Solutions Limited TopPrevNext