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...


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?



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here