Professional Documents
Culture Documents
Interfaces UML
Interfaces UML
(Abstract)
ENEMY
<INTERFACE>
IDamagable
SWORD
The sword doesn’t have to check using if else or case statement if it has
damaged a Ghost, Skeleton or Zombie. The sword attack Class uses a
reference hit for IDamagable to discover the Enemy type that’s received
damage from the sword by using the IDamagable interface.