Hello everyone!
This is my first post. I am beginner in learning CS and am working through the art and science of
Java book to teach myself Java, using a version of Stanford's cs106a class. I'm having a trouble with one of the exercise.
The task is: Write a GraphicsProgram that uses two nested for loops to create the following checkerboard diagram in the upper left corner of the canvas. Alternate squares both horizontally and vertically contain a somewhat smaller GOval to create the checkerboard effect.
My code works in proper way:
But it looks so messy
, so I ask you to help me find more laconic way to write this program please