Final exam contents:
Seating assignments for Sieg 134 (all sections):
list (names shortened),
map
No seating assignments for part 1 of the final exam taken in your assigned section.
cheat sheet (will be provided as last page of exam)
TA final strategies
The questions on the final exam will be selected from the following. Each question will be worth between 5-20 points:
- Binary Tree Traversals: Perform pre-order, in-order and post-order traversals on a tree.
- Binary Search Trees: Given a set of values, add them to a binary search 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, write the output. (similar to section 8/9 problems)
- Comparable programming: Write a complete class and make it Comparable based on a given set of comparison criteria. (similar to section 8/7 problems) You will not be asked to extend another pre-existing class like some problems seen on past exams
- Collections programming: Write a method that uses one or more class from the Java Collections framework (with focus on Sets, Maps and Lists).
- Binary tree programming: Add a method to the IntTree class from lecture. (similar to section 7/31 problems)
- Binary tree programming: Add a method to the IntTree class from lecture. Similar in spirit to the previous question but harder (similar to section 8/2 problems).
- Linked list programming: Add a method to the LinkedIntList class from lecture. (similar to section 7/5 problems)
The following topics are guaranteed NOT to be explicitly tested on the final exam:
- detailed knowledge of Big-O (some questions may ask you to solve them within a certain big-O limit, but mainly this is just to ward off extremely inefficient answers)
- detailed knowledge of search/sort algorithms
- tracing or 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
- extending a pre-existing class for the Comparable problem
Practice Exams and Problems:
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. Note that many of these practice exams are from previous quarters, so they may contain problem categories that will not be on your final. Refer to the section abo
ve to determine whether or not practice exam questions are relevant for your studying.
Note: Several of these ask about sorting or ask you to write a class that extends another. You will NOT be asked these kinds of questions (though, you will have to write a class that implements th
e Comparable interface)
Additional practice problems can be found on Practice-It or by category here
Midterm Content
Seating assignments for Sieg 134 (all sections):
list (names shortened),
map
cheat sheet (will be provided as last page of exam)
TA midterm strategies
Material from Weeks 1-5 is considered "fair game" for questions on the midterm. The actual midterm exam will have 6-8 total problems. Those problems will be selected from the following kinds of questions (and no other kinds of questions):
-
ArrayList
"mystery" (look at a piece of code that uses ArrayList
s, and write its output)
-
ArrayList
programming (write a method that uses ArrayList
s)
-
ArrayIntList
programming (add a method to the ArrayIntList
class from lecture)
-
Collection programming (write a method that uses Java collections such as
List
s, Set
s, and Map
s)
-
stack and queue programming (write a method that uses
Stack
s and Queue
s)
-
linked list node manipulation (write a few lines of code to change a "before" picture of some linked nodes into an "after" picture)
-
recursion tracing (look at a piece of recursive code, and write its output)
-
recursion programming (write a method that uses recursion)
- The following topics are guaranteed NOT to be required to solve any problem on the midterm:
- programming with inheritance (extending a class, etc.)
- writing an interface (though you might have to write a method that accepts a parameter of interface type, such as
List
, Set
, Map
, etc.
- testing, debugging, commenting
- grammars
- implementing Comparable (though you may have to be a client of TreeSet and/or TreeMap which require the elements to be comparable)
- implementing sorting algorithms (though you may have to be a client of TreeSet and/or TreeMap which maintains the elements in sorted order
- hashing
Practice-It has many . We recommend that you practice on paper so here are PDFs you can print out. Note that these examples provide s2q and q2s on the Stacks and Queues question, which we will not provide on your midterm: