5 PlayableFighter
Name : PlayableFighter
Package : dragonball.model.character.fighter
Type : Class
Description : Subclass of the (Fighter) class representing ghters that the player can choose to play with. No objects of type PlayableFighter can be instantiated. The class implements the PlayableCharacter interface.
5.1 Attributes
All the class attributes are READ and WRITE.
1. int xp: The current experience points the ghter has.
2. int targetXp: The target experience points the ghter needs to reach the next level.
3. int abilityPoints: The number of ability points the ghter has.
5.2 Constructors
1.
public PlayableFighter(String name, int level, int xp, int targetXp, int maxHealthPoints,int blastDamage, int physicalDamage, int abilityPoints, int maxKi, int maxStamina, ArrayList<SuperAttack> superAttacks, ArrayList<UltimateAttack> ultimateAttacks):
Constructor that initializes all attributes of the PlayableFighter object. Used when loading the Player from a saved state. Your constructor must utilize the constructor of the (Fighter) class. Any fighter should have his/her currentHealthPoints and currentStamina set to their maximum value and the currentKi to 0.
2.
public PlayableFighter(String name, int maxHealthPoints, int blastDamage, int physicalDamage, int maxKi, int maxStamina, ArrayList<superattack> superAttacks, ArrayList<ultimateattack>ultimateAttacks):
Constructor that initializes a PlayableFighter object. Your constructor should utilize the above PlayableFighter constructor. Any ghter should have his/her currentHealthPoints and currentStamina set to their maximum value and the currentKi to 0.
The default values of the remaining attributes should be passed as follows:
level: 1
xp: 0
targetXp: 10
abilityPoints: 0
What I have tried:
I dont know how to implement these contractors