Click here to Skip to main content
16,004,458 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
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.
Java
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 fi ghter should have his/her currentHealthPoints and currentStamina set to their maximum value and the currentKi to 0.

2.
Java
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
Posted
Updated 1-Mar-16 11:02am
v3
Comments
Maciej Los 1-Mar-16 15:02pm    
Not a question at all! Sounds like homework.
John C Rayan 1-Mar-16 16:58pm    
:)
Khaled Mostafa 1-Mar-16 17:06pm    
It's a project of a lot of classes and this class specially I can not understand

1 solution

 
Share this answer
 
Comments
Maciej Los 1-Mar-16 17:11pm    
+5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900