Exam I Review Practice Problems

Download the review worksheet here: Exam I Review Practice Problems [.pdf]

Definition

It’s time for a computing exam wooo! View this not as an intimidating obstacle to be overcome, but a chance at reflection to see how much you’ve learned and where your gaps of knowledge may be.

Here’s how this is going to go:

  • The exam will take the place and time of the usual lecture (see the course syllabus) but will last only 90 minutes.

Definition

You are allowed to bring ONE 8.5” x 11” (double sided) handwritten cheat sheet with any information you’d like with you for consultation into the exam.

Careful

The exam is CLOSED note (except for the cheat sheet) and CLOSED electronics (computers, phones, including headphones). You may NOT collaborate with peers or any other person during the duration of the exam.

The exam may feel long, but that’s OK! Take your time, a deep breath or two, and keep pushing!

The exam does not have a forced curve (i.e., that only some set number of people can receive A’s, B’s, etc.), but it WILL have a difficulty adjustment (upward bonus) if it was too hard.


Topics

Exam I will cover the topics from lectures 1-10. These include:

  • Java programming: instances vs. classes (and relatedly: non-static vs. static fields / methods), class design, access modifiers, inheritance, abstract vs. concrete classes, interfaces, inner-classes, objects vs. primitives, references, tests for equivalence, Object superclass, overriding methods.
  • Memory architecture: garbage collection, memory management, dynamic allocation, stack vs. heap in memory, references within this context, how to draw variables in stack and heap.
  • Data structures: distinction from Abstract Data Types (Lists, Stacks, Queues), interface vs. implementation.
  • ArrayLists: dynamically sized array, implementation details, operations that ArrayLists handle well and which they handle poorly, distinction from primitive arrays.
  • LinkedLists: Node-based references, implementation details, operations that LinkedLists handle well and which they handle poorly.
  • Class Examples: Forneymon, IntList, IntArrayList, IntLinkedLists, and all classwork exercises. Any may be referenced or expanded upon during the exam.

Question Types

The exam is answered with pen and paper, and includes:

  • Short-answer questions: explain a concept in 1-3 sentences
  • Drawing the stack and heap: stack frames, local variables, objects, arrays, and references
  • Drawing linked list and array list operations: how nodes, references, head, and size change when you add or remove
  • Reading code: trace what a method does, explain it in plain English, and find and fix a bug

Be prepared to answer some questions similar to those on the assignments and in-class exercises.

Furthermore, although I won’t ask you anything about mechanics we haven’t covered in class, you might be expected to apply the mechanics we’ve learned about in a way that we didn’t see in class. If you thoroughly understand the material, there should be no surprises, but still challenges.


Preparation

Here is my suggestion for preparation order:

  1. Re-read my course notes, re-doing the exercises if you aren’t clear on any of them.
  2. Study any available classwork and homework solutions.
  3. Consult the syllabus’ recommended extra-practice books for problems on topics that you’re still unfamiliar with; there are plenty for all of our data structures.
  4. Still not confident on a topic? Feel free to ping on Slack or email me and I will try to get to you as soon as I can.