on-top?. It takes a point
and returns true if it is in the uppermost 50 pixels of the window.
above-diagonal?. It takes in a posn and
returns true if the point is above the diagonal. [Hint: In
Racket, the diagonal goes from the top left corner (also known as the
origin) to the bottom right corner.]within-distance?. It takes in two posns
and a number, and tells whether the posns are within that distance of one
another. (Hint: You will need to call the distance function
written in class!)
find-area. It consumes two Posn
structures -- one representing the center of a circle and the other
representing a point on its circumference -- and produces the area of the circle. For full credit, you need to design a helper function that finds the area of a circle, using the formula A = pi * r * r, then have find-area call that function.
| GRADING | Contract | Purpose | Data Analysis | Examples | Skeleton w/Inventory |
Add details to skeleton |
Definition |
| 30 points: on-top? | /2 | /1 | /3 | /3 | /3 | /3 | /15 |
| 30 points: Exercise 20.4.2 | /2 | /1 | /3 | /3 | /3 | /3 | /15 |
| 40 points: within-distance? | /2 | /1 | /3 | /3 | /5 | /6 | /20 |
| Extra Credit: find-area | /4 | /2 | n/a | /6 | /4 | /4 | /20 |
Last Modified: 11/19/14