The following method takes in a Picture object pic
as a parameter. This picture will be 500 pixels by 500 pixels.
For this question,...
The following method takes in a Picture object pic
as a parameter. This picture will be 500 pixels by 500 pixels.
For this question, change every pixel with an even x or y coordinate to black. For example (1, 2) and (0, 3) should be turned to black.
To help you know if a nuber is even, you'll have access to a method called isEven
that takes in an int as a parameter and returns true if the parameter is even.
So isEven(2)
or isEven(4)
would return true, but isEven(3)
would return false.
Your feedback will appear here when you check your answer.