1. Given the Polygon object created by the statement
Polygon star = new Polygon();
write statements to add the following points to star: (20, 50), (35, 70), and (50, 50).
2. Consider the polygon star you defined for the previous question.
a. What statements test whether the Point object aPoint lies within the interior of star?
b. What statements move star to the left 5 pixels and up 10 pixels?
c. What statements remove all points from star, resulting in an empty polygon?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here