class SmallDog extends Dog { /** constructor * @param nom The name for this SmallDog. */ SmallDog( String nom ) { super( nom, "yip" ); } private final static int NUM_REPEATS = 150; // No need to include a javadoc comment // the docs for the overridden version will get used here. public String speak() { String result = super.speak() + " "; for ( int i = 0; i < NUM_REPEATS; i++ ) result = result + sound; return result + "."; } }