Final Exam

  • Date: Thursday, March 18, 2010
  • Time: 2:30 - 4:20pm
  • Place: Kane 120 (please note that this is NOT our normal lecture room)

Practice Exams:

We strongly suggest that you try to solve all of these problems yourself, on paper, without a computer, and without looking at the answer key until you're done. You may also want to time yourself to practice your pacing. Then once you have completed the paper exam, check the answer key or type in any problems you like into the Practice-It system to see whether you solved them correctly.

  • Sample final exams posted here are intended to be very similar to the actual final exam. The number of problems and type of problems on the actual exam will be much like what is seen on these practice exams.
  • The following topics are guaranteed NOT to be explicitly tested on the final exam:
    • detailed knowledge of Big-Oh (some questions may ask you to solve them within a certain big-Oh limit, but mainly this is just to ward off extremely inefficient answers)
    • recursive backtracking (recursion will definitely be needed, but not specific backtracking problems)
    • catching exceptions
    • priority queues
    • input/output streams
    • abstract classes
    • inner classes
    • implementing an Iterator class
    • implementing a "generic" class (one that accepts type parameters such as <T>)
    • hashing

The questions on the final exam will be the following. Each question will be worth between 10-20 points:

  • Inheritance and polymorphism: Given a set of classes with inheritance relationships, a set of variables declared using those classes, and a set of method calls made on those variables, write the output. (similar to section 18 problems)
  • Inheritance/Comparable programming: Given an existing class, write a complete subclass of it that adds certain features. Also make the class Comparable based on a given set of comparison criteria. (similar to section 11,17 problems)
  • Linked list programming: Add a method to the LinkedIntList class from lecture. (similar to section 8, 19 problems)
  • Searching and sorting: Trace the execution of binary search, selection sort, and merge sort on given arrays of integers. (similar to section 5 problems)
  • Binary search trees: Given a set of values, add them to a binary search tree. Then perform traversals in the three standard orders on that tree.
  • Binary tree programming: Add a method to the IntTree class from lecture. (similar to section 15, 16 problems)
  • Binary tree programming: Add a method to the IntTree class from lecture. Similar in spirit to the previous question but harder.

Additional Sample Problems:

If you are a real practice problem junkie and want even MORE problems, here are links to a few other past exams. They don't exactly match the current exam format, and they are not in our Practice-It system, so they may be of limited use. Some of the problems on these tests don't match the topics, difficulty level, and/or type of questions we currently plan to ask. These links are provided merely as a convenience.


The final exam follows the same regrade policy as the midterm exam (see below). A cover sheet and Practice-It output is required for a final exam regrade. You can slide your final under Marty's office door with the proper cover sheets attached. Regrades will be accepted through the end of the first week of Winter 2010 quarter.

Midterm Exam

Scores, Curve, and Other Information:

You can now check your midterm score on MyUW. If you don't see your midterm score on your MyUW page, follow our MyUW directions.

Curve: The score listed on MyUW is your raw (un-curved) score. There will be a +3 point curve added to everyone's score. However, the maximum possible midterm score is 100. So, for example, if you got 99 on the exam, your score maxes out at 100, not 102.


stat raw curved
MEDIAN 76 79
AVG 73.7 76.7
STDEV 16.2 16.2
grade raw curved % of class
As (90-100) 75 97 24%
Bs (80-89) 93 101 25%
Cs (70-79) 92 85 21%
Ds (60-69) 63 56 14%
Es (0-59) 80 64 16%
question average score
Q1 (ArrayList mystery) 17.8 / 20
Q2 (Recursive tracing) 15.3 / 20
Q3 (Comparable) 11.5 / 15
Q4 (Stacks and queues) 10.5 / 15
Q5 (Collections) 9.6 / 15
Q6 (Linked lists) 9.1 / 15

Student questions: You will get your midterm back in section. If you have questions about exactly what you missed and why, please get your exam from your TA and look it over, then contact the TA if you still have any questions.

Low Grades: Another topic some students ask about is: If their score was lower than they hoped, how much effect will that have on their grade, or what are their options, etc.? Most of the information to answer this can be found on this web site. The course syllabus lists the relative grading weight of homework vs. midterm vs. final exam, so you can use that to compute the rough effect on your grade of a particular midterm score. You may want to use our new Grade-a-nator page to help you compute your approximate grade. Also look at our FAQ page for info about S/NS grading options, drop dates, and other information.

Regrades: We work hard to grade consistently and correctly, but sometimes we make mistakes in grading. See the instructios below to request a regrade on your exam if you think anything was not graded accurately. We have also posted a solution key and posted the midterm problems on our Practice-It tool so that you can test your answers.

Regrade Policy:

If your exam score was added up incorrectly, take it to your TA and they'll fix it for you.

If you disagree with the grading, such as if you think your solution actually does work, or that your solution is more nearly correct than it was given credit for, the procedure for regrades is the following:

  • If your complaint is about the correctness of your solution to a programming question, go to our Practice-It! system, which will contain runnable testers for the midterm problems. Type your code into Practice-It, fixing any trivial syntax problems. Run it for yourself and see how nearly correct your solution is.
  • If you still think your grade is incorrect, submit your exam to Marty for a regrade. (Either give it to us in lecture, go to our office hours, or slide it under our office doors.) You must include a cover page with a brief written explanation of what specifically you think was misgraded and why. If your complaint is about overly harsh grading on a programming question, you should also submit a printout of your code being run in Practice-It, along with the test case results, to us so that we can to verify its correctness. We will not accept any exam for a regrade unless it includes this cover page, and we will not re-evaluate grading of the correctess of any programming questions without a typed copy of your solution from Practice-It being shown to us first.
  • Also note: When you submit an exam for a regrade, we will regrade your entire exam. If we notice anywhere that you were mistakenly given too many points, we will also correct this, up to a maximum penalty of -2 for the entire exam. So it is possible (though unlikely) that a regrade request will result in you receiving a slightly lower mark than what you started with.
  • All midterm regrade requests (other than simple score addition errors) must be submitted to Marty by Friday, March 5, 2010.


  • Date: Wednesday, February 17, 2010
  • Time: in lecture, 50 minutes
  • Place: in normal lecture room, KANE 120

Practice Exams:

The actual midterm exam will have roughly 6-8 total problems. Those problems will be selected from the following kinds of questions:

  • ArrayList "mystery" (look at a piece of code that uses ArrayLists, and write its output)
  • ArrayList programming (write a method that uses ArrayLists)
  • Collection programming (write a method that uses Java collections such as Lists, Sets, and Maps)
  • stack and queue programming (write a method that uses Stacks and Queues)
  • linked list node manipulation (write a few lines of code to change a "before" picture of some linked nodes into an "after" picture)
  • linked list programming (add a method to the LinkedIntList class from lecture)
  • recursion tracing (look at a piece of recursive code, and write its output)
  • recursion programming (write a method that uses recursion)
  • searching and sorting (given an array of data, show which elements would be examined if the array were searched using binary search; given an array of data, show which elements would be changed if the array were sorted using selection sort or merge sort)
  • Comparable interface (given a description of a Java class, write code to make that class implement Comparable such that its objects will have a particular natural ordering)
  • The following topics are guaranteed NOT to be required to solve any problem on the midterm:
    • Java I/O, file processing, Scanner
    • programming with inheritance (extending a class, etc.)
    • testing, debugging, and commenting (section 4)
    • grammars / BNF
    • Iterator
    • implementing binary search (note: understanding how the algorithm works at a high level IS potentially on the exam)
    • implementing sorting algorithms (note: understanding how the selection sort and merge sort algorithms work at a high level IS potentially on the exam)
    • recursive backtracking (note: this is a topic covered in lecture on Fri Feb 12; normal recursive programming IS potentially on the exam)

Additional Sample Problems:

If you are a real practice problem junkie and want even MORE problems, here are links to a few other past exams. They don't exactly match the current exam format, and they are not in our Practice-It system, so they may be of limited use. Some of the problems on these tests don't match the topics, difficulty level, and/or type of questions we currently plan to ask. (For example, a lot of these exams ask problems about inheritance and about arrays.) These links are provided merely as a convenience and as another study aid.

Rules and Information:

  • You must show your UW Student ID card to a TA or the instructor for your submitted exam to be accepted.
  • You will have 50 minutes to complete the exam. You may receive a deduction if you keep working after the instructor calls for papers.
  • The exam is open-book/notes. You must work alone and may not use any computing devices of any kind including calculators. Cell phones, music players, and other electronic devices may NOT be out during the exam for any reason.
  • Unless a question specifically mentions otherwise, your code you write will be graded purely on external correctness (proper behavior and output) and not on internal correctness (style). So, for example, redundancy or lack of comments will not reduce your score.
  • You don't need to write any import statements in your exam code.
  • On the exam it will be allowed to abbreviate S.o.p for System.out.print and S.o.pln for System.out.println. Otherwise do not abbreviate any code on the exam.
  • Please be quiet during the exam. If you have a question or need, please raise your hand.
  • Corrections or clarifications to the exam will be written at the front of the room.
  • If you violate the University Code of Conduct during the exam, you may receive a 0% for the exam and possibly further punishment.
  • When you have finished the exam, please turn in your exam quietly and leave the room.
  • If you enter the room, you must turn in an exam paper and will not be permitted to leave the room without doing so.