class Cat extends Animal { // A Cat "is-a" Animal. double clawSharpness; // 0.0 represents dull; 1.0 is razor-sharp. /** Constructor * @param nom, the cat's name. */ public Cat( String nom ) { super( nom, "meow" ); // Call the superclass's constructor. this.clawSharpness = 0.9; // Kittens start out with sharp claws. } // A method specific to cats, not shared by all Animals: /** What happens, when a cat pounces. * @return The sound of this cat pouncing. */ String pounce() { // Every time they pounce, the claws get 10% closer to perfect sharpness: this.clawSharpness += 0.1*(1-this.clawSharpness); return "whoooomf"; } }