How To Solve It
Generate raindrops until all of the pavement is covered while counting them … expect a loop with a termination test based on “all wet”
How to determine if pavement is wet?
- The program cannot “look” at the form and “see” if it is “wet”
- How is a position on the pavement determined to be wet?
- When is the position “under” the droplet?
- When it is within “rad” of the circle center
- How is “within” rad determined?
- Distance between pavement position (x, y) and center (xCoord, yCoord) is
?(xCoord-x)2 + (yCoord-y)2