Midterm and Final Exams



Exam Details

Midterm Exam
Monday, October 26, 2015 (2:30
3:20 pm, Smith 120)

Final Exam
Tuesday, December 15, 2015 (2:30
4:20 pm, Smith 120)


Exam Rules and Information

Seat Assignments

You must sit in your assigned seat. The seat assignments are: list, map

Bring Your UW ID

We may ask to check your UW ID card during the exam so please have it ready.

Closed Book

The exam is closed-book. You must work alone and may not use any computing devices of any kind including calculators or digital copies of the textbook. Cell phones, music players, and other electronic devices may NOT be out during the exam for any reason.

Coding Style

Unless a question specifically mentions otherwise, the 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.

Academic Integrity

If you violate the University Code of Conduct during the exam, you may receive a 0% for the exam and possibly further punishment. If you continue writing after time is called, you will receive a 10 point penalty.

Final Details

You will have 110 minutes to complete the exam. We will distribute the exam early and you can read and fill out the cover page of the exam, but you should not look at the exam questions until you are told to begin.

Cheat Sheet

There will be a cheat sheet cheat sheet included as the last page of the exam. You may remove this from your exam if you wish once the exam begins, but be sure to hold the staple when you remove the exam because otherwise your exam is likely to come apart. Space will be provided for your answers and you may use the back of the cheat sheet as scratch paper.


Exam Format

The final exam will have the following types of questions:
  • Binary Tree Traversal. Perform traversals in the three standard orders on a tree.
  • Polymorphism Mystery. 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, determine the output.
  • Collections Programming. Solve a programming problem using collections (maps, sets, etc.)
  • Stacks/Queues Programming. Solve a programming problem using stacks and queues.
  • Recursive Programming. Solve a programming problem using recursion.
  • Comparable Programming. Write a complete class and make it Comparable based on a given set of comparison criteria.
  • (Easier) Binary Tree Programming. Add a method to the IntTree class from lecture.
  • (Harder) Binary Tree Programming. Add a method to the IntTree class from lecture
  • Linked List Programming. Add a method to the LinkedIntList class from lecture.

Untested Topics

The following topics WILL NOT appear on the exam:
  • Interfaces; Abstract classes
  • 2-D arrays
  • 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)
  • scanners (file or line)
  • writing code with 2-D arrays
  • 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


Practice-It

Practice-It has many sample finals. Note that some of the questions will be those that normally appear on midterms (see here). We recommend that you practice on paper (see below).


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.

Midterm Details

You will have 50 minutes to complete the exam. We will distribute the exam early and you can read and fill out the cover page of the exam, but you should not look at the exam questions until you are told to begin.

Sample Solutions

Download


Exam Regrades

If you believe that one or more programming problem was incorrectly graded and you would like Adam to regrade it, you must:
  • Type in the problem(s) to a Java file exactly as it appears on your exam. DO NOT EDIT YOUR ANSWER.
  • E-mail Adam a detailed description of why you believe your problem(s) were graded incorrectly. Attach the Java file with your code.
  • Put your physical exam under Adam's door (CSE 444).
  • All regrades must be received by Wednesday, November 4. No regrades will be accepted after this day for any reason.
  • If you submit a frivolous regrade (i.e., you want more points but your answer is incorrect and you disagree with the partial credit you got), Adam will re-grade your entire exam, and you may lose more points than you receive back.

Cheat Sheet

There will be a cheat sheet included as the last page of the exam. You may remove this from your exam if you wish once the exam begins, but be sure to hold the staple when you remove the exam because otherwise your exam is likely to come apart. Space will be provided for your answers and you may use the back of the cheat sheet as scratch paper.


Exam Format

The midterm exam will have the following types of questions:
  • Parameter Mystery. Given a method with confusing parameters, what does it do?
  • Code Simulation. Given a method and various inputs, simulate execution of the method on those inputs.
  • Reference Semantics Mystery. Given a method with several parameters and calls to it, what happens to the variables? This question will likely include simple Objects.
  • Assertions. Given various code points, determine if certain boolean expressions are Always/Sometimes/Never true.
  • Programming. Write a method to solve a programming problem.
  • Arrays Programming. Write a method to solve a programming problem that features arrays.
  • File Processing Programming. Write a method ot solve a programming problem that features file processing.
  • Challenge Programming. Write a method to solve a programming problem that is significantly more difficult than the others.

Untested Topics

The following topics WILL NOT appear on the exam:
  • Converting between decimal (base-10) and binary (base-2) numbers
  • Classes DrawingPanel and Graphics
  • do/while loops and the break statement (regular while loops may be needed, though)
  • Exceptions and try/catch statements
  • Preconditions and postconditions
  • assert statement
  • null
  • Multidimensional arrays
  • The Object class; implementing an equals method; the instanceof keyword
  • The advanced Husky-only methods of Critters, such as getX, getNeighbor, win, lose, and mate
  • Interfaces; Abstract classes
  • Material from Chapter 10 and above


Practice-It

Practice-It has many sample midterms. We recommend that you practice on paper (see below).


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.