Implement a general Character superclass to simulate what is common to all characters (a) Implement class data fields to support at least the data fields described above about the game character. (b) Implement a constructor method to initialize any class data fields. (c) Include an abstract method to simulate the character using a special skill. The implementation of this method is intended to be ’filled in’ in the subclasses, where the character has a specific nature and skill set
public abstract class Character {
private String name;
private String weapon;
public Character(String name, String weapon) {
this.name = name;
this.weapon = weapon;
}
public abstract void specialSkill();
}
Comments
Leave a comment