Skip to main content
Lesson 1 - Introduction to Object Oriented Programming
Lesson MenuPrevious
  
L.A.1.1 - DrawHouse page 8 of 8

Background:

You will be provided with a file named apcslib.jar, which contains the code needed to implement the graphics tools to draw objects. The specifications of the drawing tools are provided in Handout H.A.1.1 - DrawingTool. Simply place the apcslib.jar file in the appropriate folder location so the Java compiler can find it. Then add this line of code

import apcslib.*;

at the top of your program and the drawing tools are available for use.

Assignment:

Write a program that creates a drawing area of appropriate size (try 500 x 500) and draws a house similar to the one shown below and with these specifications:

  1. The house should fill up most of the drawing area, i.e. draw it big.

  2. The house should be centered horizontally on the screen.

  3. The house must have a sloped roof. It can be of any slope or configuration. But you cannot have a flat roof on the house.

  4. Adding a door (centered) and windows is optional.

Instructions:

  1. Include your name as a documentation statement and also a brief description of the program.

  2. You will need to turn in (either on paper or electronically) a copy of your code and a picture of the house that resulted.


Lesson MenuPrevious
Contact
 ©ICT 2003, All Rights Reserved.