In Lab 1.1 First House, you used the gpdraw library to draw a house all in the main method. This is fine when your house has only a few parts, but what if you wanted to have 6 windows, each with some customization? In that case, it would be nice if for each window, you could call the same method and pass different parameters. The focus of second house will be to create a house where the parts are drawn in customizable methods with parameters.
PX_LastName_FirstName_SecondHouse
static DrawingTool pen;
pen = new DrawingTool(paper);
Each method you write for house parts must also be declared static:
public static void drawWindow(int width, int height, ...)
Pick one of the house parts you already generalized and create a separate method for that part.
Remember, every lab should have a header in the format below at the top of your class:
/*
Name: (your name here)
Date: (submission date)
Period: (your period)
Is this lab fully working? (Yes/No) If not, explain:
If resubmitting, explain what was wrong and what you fixed.
Create a HW Quiz question that any student who completed this lab would reasonably be expected
to complete within 5 minutes.
*/
You must Sign In to submit to this assignment
Last modified: August 16, 2024
Back to Lab 1.1 First HouseDark Mode
Outline