Question: Before you begin the problems below, create a new package for this homework. ( In Java ) This homework involves creating a simple Pok mon
Before you begin the problems below, create a new package for this homework. In Java
This homework involves creating a simple Pokmon program. If you are not familiar with
Pokmon take some time to look it up online. For your first task, create an enum to
represent different types of Pokmon: NORMAL, FIRE, GRASS, and WATER.
Next, create a class to represent a Pokemon. It should include at least the following:
a Fields for:
i Name
ii Type should always be NORMAL.
iii. Attack
iv Health
appropriate.
c At least one constructor.
d A toString method.
e A method that is called when the Pokemon is attacked by some other Pokemon.
The method should define a Pokemon parameter and deduct the other Pokmons
attack from this Pokmons health. The Pokmons health should not be reduced
below The method should return the amount of damage done.
f If a Pokmons health is reduced to the Pokmon loses consciousness. Write a
method that returns true if the Pokemon is conscious, and false otherwise.
Before you begin the problems below,
create a new package for this homework.
This homework involves creating a
simple Pokmon program. If you
are not familiar with Pokmon take
some time to look it up online. For
your first task, create an enum to
represent different types of
Pokmon: NORMAL, FIRE, GRASS,
and WATER.
Next, create a class to represent a
Pokmon It should include at least
the following:
a Fields for:
i Name
ii Type should always
be NORMAL.
iii. Attack
iv Health
b As always, use proper
encapsulation and include
accessors and mutators as
appropriate.
c At least one constructor.
d A toString method.
e A method that is called when
the Pokmon is attacked by
some other Pokmon The
method should define a
Pokemon parameter and
deduct the other Pokmons
attack from this Pokmons
health. The Pokmons
health should not be reduced
below The method should
return the amount of damage
done.
f If a Pokmons health is
reduced to the Pokmon
loses consciousness. Write a
method that returns true if
the Pokmon is conscious, and false otherwise.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
