18 this.weaponName = name;
19 this.power = Math.max(0,
power);
The Weapon class represents any game weapon with a name and power level.
String getName()
Returns the name of the weapon.
Weapon(String name, int power)
Constructs a new Weapon with the specified name and power level.
int shoot()
Simulates shooting the weapon and returns the power generated.