Q:

(Connected rectangles) Listing 28.10, ConnectedCircles.java, allows the user to create circles and determine whether they are connected

0

(Connected rectangles) Listing 28.10, ConnectedCircles.java, allows the user to create circles and determine whether they are connected. Rewrite the program for rectangles. The program lets the user create a rectangle by clicking a mouse in a blank area that is not currently covered by a rectangle. As the rectangles are added, the rectangles are repainted as filled if they are connected or are unfilled otherwise, as shown in Figure 28.25b–c.

(b) Rectangles are not filled with a color if they are not connected. (c) Rectangles are filled with a color if they are connected.

All Answers

total answers (0)

Similar questions


need a help?


find thousands of online teachers now