LAB 5 - House with a Picket Fence
(Due before class on November 3, 2006)
TThe purpose of this lab is to use Conditional and Loop statements to customize the drawing of a picture.
Write a Java application that draws a simple fence with vertical, equally spaced slats backed by two horizontal support boards. Behind the fence shows a simple house in the background. Make sure the house is visible between the slats in the fence.
You program include a Slat class that draws the fence slat and a House class that draws a house in a designated position. Your program will ask the user for the number of slats (based on the size of your slat, you will need to tell the user what is the maximum number allowed), the color of the fence, and whether the house is on the left side or right side of the image before drawing the picture.
As in the previous assignment, you should use nested panels with one inner panel for the input and a second inner panel for the picture.
Grades are determined using the following scale: