Strategy Pattern is behavioural pattern and works in runtime.

The Output is just an example and every class can implement their own logic in the overridden methods.

The Output:
TaskA business logic must be implemented here.
TaskB business logic must be implemented here.
TaskB business logic must be implemented here.