DogTest - Labrador lab = new Labrador("Hershey",

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

View Full Document Right Arrow Icon
// **************************************************************** // DogTest.java // // A simple test class that creates a Dog and makes it speak. // // **************************************************************** public class DogTest { public static void main(String[] args) { Yorkshire yorkie = new Yorkshire("Fluffy"); System.out.println(yorkie.getName() + " says " + yorkie.speak());
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Labrador lab = new Labrador("Hershey", "chocolate"); System.out.println(lab.getName() + " says " + lab.speak()); System.out.println("The average breed weight for a labrador is " + lab.avgBreedWeight()); System.out.println("The average breed weight for a yorkshire is " + yorkie.avgBreedWeight()); } }...
View Full Document

This note was uploaded on 03/22/2010 for the course CS 202 taught by Professor Fong during the Spring '10 term at SIU Carbondale.

Ask a homework question - tutors are online