Benofficial
Fanatic
Ask ko lang po kung sino makakatulong sakin sa Java, nasa pic po yung output. Naka zip naman po yung sample file. Sana matulungan nyo ko. Asap
For Pokemon Class:
Pokemon Attributes:
String name
String type
int life - all starting pokemon will have 100 life
int damage - level 1 starts at 10dmg
int level - always starts at level 1
int exp - 10exp at level 1
int speed - 20 speed
Pokemon Methods:
getLife
getName
getSpeed
getExp
gainExp - add 10exp
fight - method wherein the two pokemons will attack each other
attack - randomly add damage (0dmg-5dmg only) to the pokemon
levelUp - add one level to the pokemon and revert the life to 100
NOTE: all pokemon attributes are private
In the PokemonDemo (the file that contains the main method):
Instantiate two pokemons (name and type).
The pokemon that is faster will attack first.
They will continue to fight until either of the pokemon's
life is 0. The pokemon with the highest HP left is the winner.
The winner will gain 10 experience and level up if the experience is a multiple of 10.
For Pokemon Class:
Pokemon Attributes:
String name
String type
int life - all starting pokemon will have 100 life
int damage - level 1 starts at 10dmg
int level - always starts at level 1
int exp - 10exp at level 1
int speed - 20 speed
Pokemon Methods:
getLife
getName
getSpeed
getExp
gainExp - add 10exp
fight - method wherein the two pokemons will attack each other
attack - randomly add damage (0dmg-5dmg only) to the pokemon
levelUp - add one level to the pokemon and revert the life to 100
NOTE: all pokemon attributes are private
In the PokemonDemo (the file that contains the main method):
Instantiate two pokemons (name and type).
The pokemon that is faster will attack first.
They will continue to fight until either of the pokemon's
life is 0. The pokemon with the highest HP left is the winner.
The winner will gain 10 experience and level up if the experience is a multiple of 10.
