Your code will be compiled as C++14, make sure you use appropriate syntax. The Entity class has been supplied for you in
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Your code will be compiled as C++14, make sure you use appropriate syntax. The Entity class has been supplied for you in
Your code will be compiled as C++14, make sure you use appropriate syntax. The Entity class has been supplied for you in the entity.h file. - You do not need to change this file. Write a class called Player in the file player.h. - Player should publicly inherit from the Entity class provided. - Player should have a constructor that takes no arguments. - A Player is an Entity with a maximum health of 100. - Player should have a method called heal - heal takes no arguments. - heal returns nothing. - Calling the heal heal method of a Player should increase the health of the Player by 10. - The health of a Player should never be greater than the maxHealth.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!