Well, there were 100 pts total broken down as follows.
At no point do the instructions indicate the any square should be moved or moving. Exercise *requires* use of instance variable(s). Heck, all the programs in this chapter require instance variable(s) !
If you think you "found a way" to do the exercise without at least one instance variable being necessary well, let's just say, that's ... unlikely.
Write a program that draws a filled 20-by-20 square at the mouse location each time the mouse is pressed. When the mouse is released, the frame of the square should remain. The user should then be able to press again to create a new filled square at a new location that will leave a frame when the mouse is released.
Write a program called DrawRect. The program should display the frame of a rectangle when the mouse is pressed. The rectangle should be 100 by 100 pixels with the upper left corner at the point where the mouse was clicked. When the mouse is dragged, the frame should move with the mouse, with the upper left corner of the rectangle always following the cursor. When the mouse is released, the rectangle should be filled in so it is no longer just a frame.
Since we had not discussed programming standards, these points were not checked or awarded. Instead the 'programming part' of the homework was graded out of the remaining 40pts.
This represents our future! We want to write the BEST code and not just settle for "pretty good" code. This means efficient & readable -- two topics we'll come back to again and again throughout the semester. They separate an excellent programmer from an average one.