I can be such a nerd sometimes
Code:public class Qwertysaur extends EoFFMember{ /** * Fields */ private boolean isDead; /*other Qwertysaur fields go here */ /** * Constructor for objects of class Qwertysaur */ public Qwertysaur (){ isDead = false; } /*overloaded Qwertysaur constructor goes here */ /** * method to see if Qwertysaur is dead */ public boolean getIsDead(){ return isDead; } /** *method to post on EoFF with Qwertysaur * * @param anyPost what you want Qwertysaur objects to post * using the superclass print method */ public void qwertysaurPost(String anyPost){ if(isDead == true;){ super.print("Qwertysaur has died. :("); } else{ super.print(anyPost); } } /** * method to kill Qwertysaur objects */ public void killQwerty(){ isDead = true; } /* other qwertysaur methods go here*/ }



Reply With Quote