Question: Extend Exercise P10.4 so that you can make the houses appear in different colors. The color should be passed as an argument to the drawHouse

Extend Exercise P10.4 so that you can make the houses appear in different colors. The color should be passed as an argument to the drawHouse method. Populate your frame with houses of different colors.


Data from Exercise P10.4

Extend Exercise P10.3 by supplying a drawHouse method in which you can specify the position and size. Then populate your frame with a few houses of different sizes.

Step by Step Solution

3.46 Rating (169 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

ANSWER import javaawtGraphics import javaawtColor import javaxswingJFrame public class Hous... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java Concepts Late Objects Questions!