Posted By:
WarnerJan_Veldhuis
Posted On:
Thursday, May 4, 2006 02:49 AM
Sounds like an RPG.... Make your Pacifist, Fighter, Scholar etc all share an interface called Curable. That interface would look like this:
public interface Curable {
void cure();
}
You can now have a method cure() that operates on anything that's "Curable"
public void cure( Curable target) {
target.cure();
}
That's where interfaces are for.... :)