Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 3 Create a class called Enemy that has class variables damage _ multiplier, an int, and armor _ bonus, an int. The value for
Problem
Create a class called Enemy that has class variables damagemultiplier, an int, and armorbonus, an int. The value for damagemultiplier can
be hardcoded to and the value for armorbonus can be hardcoded to
The Enemy class should also have instance variables and basedamage. You should define a constructor that optionally takes two ints
corresponding to hp and basedamage. If no arguments are supplied, those values should default to and respectively.
Sample usage:
koopa Enemy
print koopahp
print koopabasedamage
Enemy.damagemultiplier
Enemy.armorbonus
kingkoopa Enemy
printkingkoopa.hp
printkingkoopa.basedamage
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