Replacing Type Code With State/Strategy

When the Type-Code Affects Behavior And It Should Change at Runtime

Previously, we talked about potential issues switch-case can cause, and what to do when the type affects only data, or behavior, too.

Now that we are switch-case ninjas, we can go even further and see how to tackle when the type code and the behavior change dynamically at runtime.

[Read More]