|i already have class definition for the representation of characters in an RPG (computer game). To start with, objects of your RPG character class must store the following attributes 1: a name, 2: a description (i.e., what they look like), 3: experience points, 4: health points, 5: attack points, 6: a location in the game world (an integer called currentLocationID). |
i need to add mutators for setting the absolute value of data members, add functions for making relative changes to your class. These will be called addHealthPoints(), addExperiencePoints(), and addAttackPoints(), along with subtractHealthPoints(), subtractExperiencePoints() and subtractAttackPoints(). These should accept one integer argument in order that, for example, when the character drinks a health potion, their health points can be increased by a specific amount, and when the character is struck by another character, a specific value can be subtracted from their health, contingent on the strength of their opponent.
but i dont understand how to can any one help me?