|
COMP2396
|
The BadGun has poor quality such that at each shot, only 80% of its original power can be produced (round down to the nearest integer). More...


Public Member Functions | |
| BadGun (String name, int power) | |
| Constructs a new BadGun with the specified name and power level. | |
| int | shoot () |
| Shoots the gun and returns 80% of the original power (rounded down). | |
Public Member Functions inherited from assignment2.Weapon | |
| Weapon (String name, int power) | |
| Constructs a new Weapon with the specified name and power level. | |
| String | getName () |
| Returns the name of the weapon. | |
The BadGun has poor quality such that at each shot, only 80% of its original power can be produced (round down to the nearest integer).
It is a subclass of the Weapon class and only produces 80% of the original power.
Definition at line 8 of file BadGun.java.
|
inline |
Constructs a new BadGun with the specified name and power level.
| name | the name of the bad gun |
| power | the power level of the bad gun |
Definition at line 16 of file BadGun.java.
References assignment2.Weapon.power.
|
inline |
Shoots the gun and returns 80% of the original power (rounded down).
Reimplemented from assignment2.Weapon.
Definition at line 26 of file BadGun.java.