Describe the candidate patterns you consider to satisfy the goals below, explain why, and how you would do it.
a) Given a legacy banking application, encapsulate the existing business logic component
b) Given a chess program, enable future developers to substitute the planning algorithm that decides on the next move with a better one.
c) Given a chess program, enable a monitoring component to switch planning algorithms at runtime, based on the opposing player's style and response time.
d) Given a simulation of a mouse solving a maze, enable the path evaluation component to evaluate different paths independently of the types of moves considered by the mouse.