Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

must be in c++ please A. Create the Zombie class We are about to make a command-line based game called Zombie Madness and the first

must be in c++ please image text in transcribed

A. Create the Zombie class We are about to make a command-line based game called Zombie Madness and the first step is to create the enemies: the zombies. A zombie walks around a field (it has an X and Y position) and can go slow or fast. It can also be freshly dead (it can still eat people), or very dead (it can no longer eat anyone). Zombies also attempt to attack the player and if they reach the player they attack. Create the class Zombie. Create the protected attributes for this class from the information above (4 attributes) plus 2 more attributes: the destination x position and the destination y position. This is where the zombie is trying to go (slowly) Create 4 functions: o setDestination takes two integer parameters (xPos and yPos) and makes that the zombie's desired location. o Move the zombie towards its target or goal position: the method should be called take Turn and it has no parameters. The function returns an integer indicating the amount of damage the zombie does to the player (thus most times you expect a 0). Print the zombie's position and some information about the zombie. This function should be called printInfo. printInfo doesn't return anything or take any parameters but uses cout statements to output information to the screen. O The function hit will not take any parameters but instead returns the amount of damage the zombie does (let's say it returns the value 3 for "3 hit points" from the player. If the zombie is very dead, the value returned is O. Notice this value is then returned from take Turn. o You should probably also make getter methods for various attributes as well. You can choose what attributes other classes need to have access to. This is for a game

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 2005 Databases

Authors: Karli Watson

1st Edition

0470044063, 978-0470044063

More Books

Students also viewed these Databases questions

Question

Find the length of the curve y = x2 / 16 from x = 0 to x = 4

Answered: 1 week ago