The following Images below presents the result of code when the Invention2.java program was executed from IntelliJ.
The pixels in this case are rectangles with dimesions 1*1 (A Square is a rectangle)
The pixels in this case are rectangles with dimesions 25*25 to illustrate the shapes being painted