Final
Content
The questions on the final exam will be selected from the following. Each question will be worth between 5-20 points:
- Binary Tree Traversals
- What is it? Perform pre-order, in-order and post-order traversals on a tree
- What's an example? traversal2
- Binary Search Trees
- What is it? Given a set of values, add them to a binary search tree
- What's an example? Mew/Pikachu/Zubat/Ditto from Old Exam Database
- Polymorphism mystery
- What is it? 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 3/5 problems)
- What's an example? FeeFieFoFum
- Note: In the case the answer is an error, you will be asked to identify if the error is a run-time error or a compiler
- Comparable programming
- What is it? Write a complete class and make it Comparable based on a given set of comparison criteria (similar to section 3/7 problems).
- What's an example? Location
- Note: You will not be asked to extend another pre-existing class like some problems seen on past exams
- Collections programming
- What is it? Write a method that uses one or more class from the Java Collections framework (with focus on Sets, Maps and Lists).
- What's an example? commonHobbies from Old Exam Database
- Binary tree programming
- What is it? Add a method to the IntTree class from lecture (similar to section 2/26 problems)
- What's an example? numEmpty
- Binary tree programming
- What is it? Add a method to the IntTree class from lecture. Similar in spirit to the previous question but more challenging (similar to section 2/28 problems)
- What's an example? completeToLeve
- Linked list programming
- What is it? Add a method to the LinkedIntList class from lecture (similar to section 1/28 or 3/12 problems)
- What's an example? removeRange
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
Resources
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. A very important skill to doing well on the test is being able to look at your solution and figure out if it works without relying on a computer or the answer key since you will have neither of those available during the test. Check out more info here.
We also suggest that you save the Practice Exams until later in your studying so you can actually use them as a resource to time yourself like you would be on the real exam.
- Sample cheat sheet. A cheat sheet will be provided as the last page of the exam, but methods may be added/removed to fit what you need on the test.
- TA final strategies
- PracticeIt!
- Old exam questions database
- Practice Exams. Keys will be posted on 3/11, but please try to solve these exams before then and try to figure out if your solutions work on your own before comparing to the set of possible answers on the keys.