Labrador - { super(name); this.color = color; } //

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
// **************************************************************** // Labrador.java // // A class derived from Dog that holds information about // a labrador retriever. Overrides Dog speak method and includes // information about avg weight for this breed. // // **************************************************************** public class Labrador extends Dog { private String color; //black, yellow, or chocolate? private int breedWeight = 75; public Labrador(String name, String color)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { super(name); this.color = color; } // ------------------------------------------------------------// Big bark -- overrides speak method in Dog // ------------------------------------------------------------public String speak() { return "WOOF"; } // ------------------------------------------------------------// Returns weight // ------------------------------------------------------------public int avgBreedWeight() { return breedWeight; } }...
View Full Document

Ask a homework question - tutors are online