UW CSE logo uw

CSE 143: Computer Programming II, Winter 2009

arrow CSE Home arrow About Us arrow Search arrow Contact Info

Homework 1 (SortedIntList) 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: The assignment writeup says your sample 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: Is passing test cases enough to know I'll get a 20/20? Are they exhaustive?
A: Passing all of the test cases is a good indication that your class has the correct behavior, but no, they are not exhaustive. Your class is considered "correct" if it meets all of the specifications of the assignment write-up.
Q: Why isn't Arrays.binarySearch working for me?
A: Different versions of Java have different version of the Arrays class, only the most recent include the four parameter binary search method required for this assignment. Directions for installing this software are located in the Working at Home page of this site. If things are still not working for you (usually because you are on a Macintosh running Java 1.5), download the Arrays.java file located on the Homework page under the files for the first assignment. Save it into the same directory as your SortedIntList and ArrayIntList classes, compile it, and then use Arrays.binarySearch as before.
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: The testing code keeps giving me X error message, what does it mean?
A: Again direct this question to your TA or ask at the IPL. If you can narrow down where the error is occurring you can use the debug tools available in JGrasp or insert System.out.println commands to check for invalid states.