Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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#
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.
ROTU u leyted 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. Focus Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started