Question
Implementing Pokemon in Java 1. Create new enum to represent Pokemon types - use grass, fire, water. 2. Create new class to represent Pokemon: a)
Implementing Pokemon in Java
1. Create new enum to represent Pokemon types - use grass, fire, water.
2. Create new class to represent Pokemon:
a) every pokemon has name, type, and level
b) pokemon can be created with name, type, and level or with just name and type (in this case, default level is 1)
c) pokemon's name should be accessible from outside class. A Pokemon trainer can change the Pokemon's name at any time.
d) pokemon's type should be accessible from outside class. The type can never change.
e) pokemon's level should be accessible from outside class. The level can't be directly modified but the pokemon can level up one level at a time to a max level of 100.
f) pokemon should have string representation in the format "Pokemon{name =
g) 2 pokemon are considered equal if they have same type and level. the name doesn't matter.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started