//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //Goomba Classes //Description: Defines the behavior that governs Goombas and Goomba-related // creatures. //CS 284 //Programmed by Jonathan Voris //for 2/14/06 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package MarioFoes; class Goomba implements MarioFoeInterface { public Goomba() { } public String name() { return "Goomba"; } public String color() { return "brown"; } public String burnt() { return "Defeated"; } public String stomped() { return "Defeated"; } public String move() { return "walking straight"; } public String toString() { String disp = "A " + name() + ": It is " + color() + " colored and moves by " + move() + "."; disp += "\n" + stomped() + " if stomped."; disp += "\n" + burnt() + " if burnt."; return disp; } }