Question: 1. Define a class named Pokemon. This class contains two public variables: 1. A string named type 2. An int named HP 2. Declare

1. Define a class named Pokemon. This class contains two public variables: 1. A string named type 2. An int

1. Define a class named Pokemon. This class contains two public variables: 1. A string named type 2. An int named HP 2. Declare and define the default constructor. For the default constructor, set type to "Normal" and set HP to 100. 3. Declare and define the parametrized constructor. 4. Declare and define the function getType, which returns a string equal to the type of the Pokemon. 5. Declare and define the function changeType which takes a string as a parameter and changes the type to the passed string. Activate Windo Go to Settings to ac

Step by Step Solution

3.47 Rating (167 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

the implementation of the Pokemon class according to your requirements public class Pokemon Public v... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!