Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 = , type=, level=}"

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

More Books

Students also viewed these Databases questions

Question

Determine the y coordinate of the centroid of the body shown.

Answered: 1 week ago