/* * Filename: Yard.java * Created on Sep 19, 2006 * * Course: ITK 168 * Semester: Fall 2006 */ import becker.robots.*; /** * Yard is intended to be used with Becker's robot classes. * * This class builds a City using RectangleCity. Objects of this type * have a yard surrounded by a rectangular fence. The sides of this fence * may be even or odd length. The yard is placed by passing the street * and avenue of the northwest corner and the width and height. The yard * is filled with grass (yellow things). * * There is a house inside the yard. The house is placed by passing the * the street and avenue of the northwest corner and the width and height. * * * @author Shirley White */ public class Yard extends RectangleCity { /** * * @param yardAve - avenue of notrhwest corner of yard * @param yardStreet - streen of northwest corner of yard * @param yardWidth - width of yard * @param yardHeight - height of yard * @param houseAve - avenue of notrhwest corner of house * @param houseStreet - streen of northwest corner of house * @param houseWidth - width of house * - make sure this is small enough to fit in the yard * - always even if no extra credit * @param houseHeight - height of house * - make sure this is small enough to fit in the yard * - always even if no extra credit */ public Yard(int yardAve, int yardStreet, int yardWidth, int yardHeight, int houseAve, int houseStreet, int houseWidth, int houseHeight) { super(yardStreet + yardHeight +1, yardAve + yardWidth +1); // make yard this.makeRectangle(yardStreet, yardAve, yardHeight, yardWidth); // fill yard with grass for(int i=yardStreet; i