c project should be completed with the following base called character with common v 5150178

C++ project should be completed with the following:

  1. Base called Character with common variables like m_health, m_score and m_damage and functions like Attack(), Heal(), Get() and Set() functions.
  2. Derive a Player class from Character class with a variable called m_name, derive an Enemy class from Character class with a variable called m_ID.
  3. Make proper use of public, private and protected.
  4. Use Constructors to set default values and Destructors to delete dynamically allocated variables.
  5. Make the Attack() and Heal() in the base class pure virtual functions, and override these functions in the derived class (Player and Enemy).
  6. Use new and delete when creating objects of the Player and Enemy class.

Use exception handling (try, catch and throw) when creating the objects of the player and enemy class.


#include “Player.h”
#include “Enemy.h”

int main() {

   Character* c[2];
   // Dynamically allocate the objects using new



   for (int i = 0; i
       std::cout << c[i]->GetHealth()

   // delete the character from the memory

   return 0;

"Get 15% discount on your first 3 orders with us"
Use the following coupon

Order Now