/** * Crumudgeon - an implementation of Performer. * CSE 142 Lecture demo, 2/18/04 */ public class Crumudgeon implements Performer { /** * Construct a new Crumudgeon */ public Crumudgeon() { } /** * Twirl the specified number of times * @param n number of times to twirl */ public void twirl(int n) { System.out.println("I REFUSE!"); } /** * Clap the specified number of times * @param n number of times to clap */ public void clap(int n) { System.out.println("I WON'T!"); } /** * Report the total number of claps and twirls * @return A Crumudgeon always returns 0 */ public int tellCount() { return 0; } /** * Return a String representation of this Performer * @return a String identifying this Performer as a Crumudgeon */ public String toString() { return "A Crumudgeon"; } }