You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

497 B

AdventureInterface

Instructions

We will now use a new principle : interfaces.

Let's create an interface Tank in a file Tank.java. It has one method : getShield that returns an integer.

Create another interface Healer in a file Healer.java. It has two methods :

  • heal which takes a Character as parameter and returns nothing.
  • getHealCapacity which returns an integer.

Notions

Interface