Homework 1 (Rectangle-Rama) FAQ

Q: Will this solution get 20 / 20 points? Is this the style you want?
A: These are inappropriate questions. We call this "pre-grading." The TA won't look over your entire program for mistakes or tell you exactly what things you will get marked off for. We'll grade you on the guidelines in the homework document, and we can help you with specific issues but cannot evaluate your entire program.
Q: How do I detect a mouse click? I don't think we learned about the mouse or graphics in class.
A: You don't have to handle mouse clicks directly. The provided RectangleMain code does that. It waits for a mouse click, and when one occurs, it calls the appropriate method on your code, such as raise or delete.
Q: The assignment writeup says your solution has X methods and Y lines. I don't have exactly that many. What have I done wrong? Will I be marked off?
A: The public methods specified are necessary for your class (additionally your class should not have extra public functionality), however, you may have private helper methods if desired. You don't have to exactly match our line counts. They are just there as a sanity check. If your numbers are WAY off from ours, you may be solving the problem in the wrong way.
Q: Are these the correct fields for my class? Do I have too many/few?
A: Fields represent the state of the object and should exist as is necessary to store that state. Temporary variables, elements of data that do not need to be remembered between method calls or uses of the object, should not be fields.
Q: JGrasp/Eclipse keeps giving me X error message, what does it mean?
A: This is a question to be answered at the IPL or by your TA. Generally, while they are cryptic, error messages give some indication as to why the error occurred. An important piece of the error message is the line number where the code broke. Debugging (usually in JGrasp) at or before this line will give you the ability to see the state of your object before the crash.
Q: Why can't Eclipse compile my file? When I push the "Play" button to run it, I get a strange screen about an "Ant" build, or it won't compile or run.
A: Eclipse needs every file you are editing to be part of a project. If you just choose "File" -> "Open File", it will let you look at the file, but not compile or run it. You should create a project and put your files in the project first; then Eclipse will be able to run your program.
Q: There is an error in the provided RectangleMain code. What does it mean?
A: RectangleMain talks to your RectangleManager class. If you have, say, given one of your methods the wrong name, the error will show up in RectangleMain even though the mistake is in your code. Double-check all of your method names and parameters to make sure they match the specification. If you can't find it, again we suggest that you direct this question to your TA or ask at the IPL.
Q: I'm getting errors related to Rectangle, such as "possible loss of precision: double/int" or "cannot find symbol, method draw". What does it mean?
A: Java already includes a Rectangle class as part of its class libraries in the java.awt package. If you didn't download Rectangle.java properly, your program might be mistakenly trying to use that library Rectangle class. Make sure you downloaded the file correctly.