Your job is to add a method to the Picture class that will put centered black crosshairs into the Picture referred to by this. When myPict.crossHairs() is called, your code should change the completely white Picture labelled BEFORE to the one labelled AFTER. See image.
In order to do this, the computer must make several computations and it must be controlled by loops to repeat certain operations. The things you must program are listed AND NUMBERED here:
Write Java code into the method, as complete and correct as you can make it;
Fill in the body of the crossHairs method on the next page, MAKE SURE YOU WRITE "(1)", "(2)", "(3)", "(4)", "(5)", "(6)", "(7)", "(8)", "(9)" and "(10)", AND clearly mark what (1), (2), ... (10) refer to.
Add to G&E's Picture class a method named DrawAnX and submit a Picture.java file that demonstrates your work is correct when we run it.
Level 1: void DrawAnX(int xCenter, int yCenter, int squareSideLength) Draws the X inside a square with given center and given length of each side.
Level 2: void DrawAnX(int Xcenter, int Ycenter, int width, int height) Draws the X inside a rectangle with given center and given lengths of its two sides. The lines must go from corner to corner, crossing near the middle. This takes a lot more math than the equal-side case!