// The purpose of this class is to write a basic // honk implementation once, since it is basically // the same in every implementation. // Note that because this is an abstract class, it // cannot be instantiated with 'new'. abstract class AbstractHonkable implements Honkable { protected String honkTxt; public String honk(int n) { String s = ""; for (int i = 0; i < n; i++) { s += honkTxt; } return s; } }