Question: Modify the Grass _ Pokemon subclass so that, when trained, the attack strength for Grass _ Pokemon instances increases only if they are at level
Modify the GrassPokemon subclass so that, when trained, the attack strength for GrassPokemon instances increases only if they are at level or higher. This means that if they transition from level to level their attack should not increase. If they transition from to their attack should increment by attackboost. Do not change anything in the parent Pokemon class.To test, create an instance of GrassPokemon with the name as "Bulby". Assign the instance to the variable p Create another instance of the GrassPokemon class with the name set to "Pika" and assign that instance to the variable p Then, use GrassPokemon methods to train the p GrassPokemon instance until it reaches at least level
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
