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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!