Strategy Pattern Assignment | Homework For You
February 18th, 2020
You have recently learnt of a design pattern called the Strategy Pattern; which allows you to swap the behaviours associated with an object during run-time. You are required to do the following:
Create a console application which will simulate different types of movements in a game. The movements available currently are ground movements (walking, crawling, or running), swimming, and flying. In the future, the program should allow more movements to be added without having to alter any of the present movements. In each of the behaviours (movements) in your program, you are required to provide a suitable description to the console window of which movements is currently being executed.
As part of your submission, provide a word document which provides the following:
• An argument of why you believe the strategy pattern is suitable for this example.
• A class diagram suitable for this exercise and show where potentially other behaviours can be added in the future.
You can use a generic list to show the different movements to the console window during run-time.
solution based on C. Get Computer Science homework help today