---
tags: resources, spr22
---
# CSCI0200 Midterm Prep Guide
Here is some information on what to expect from the midterm.
Sample questions from the midterms that Kathi wrote for CS18 from Spring 2020 (paper-and-pencil) and Spring 2021 (online), as well as relevant questions from the 2019 final are in the Midterm Prep folder in Canvas (under the Files section).
There are also some study questions in this [Recap on Lists](https://hackmd.io/@cs18-spring-2021/lists-unit-recap).
## Logistics
**When and Where?:** The exam will be available on Gradescope from Thursday March 10th through Tuesday March 15th. You will have 90 minutes to work on it from the time you start. You may take the exam in any 90 minute period during the time when it is out.
:::info
If you have a letter through SAS/SEAS for time-accommodations, we will configure Gradescope with your additional time.
:::
**Overview:** The exam will focus on conceptual questions, design choices, analysis, and other questions that are better answered on paper rather than in code. While you might be asked to read some code or identify problematic parts of code that has been given to you, you will not be asked to write more than a line or two of code on the written exam. The questions will be a mix of multiple choice, fill in the blank, draw and upload a (photo of) a diagram of something, and free response.
*The questions are not designed to trick you, nor will they introduce new content.*
**Notes and references:** You may reference class notes (whether ones we have posted or ones that you have taken yourself).
- **You may not look up or search for information beyond the course website or notes that you had a part in taking or creating.**
- You may not use any materials from another student that provides information about the actual exam content (say if a friend took the exam before you did). *This would be a serious academic honesty violation that would be referred to the campus academic honesty process with a recommended NC for the course.*
- At the end of the exam, you will be asked to affirm that you followed these guidelines while taking the exam.
It's fine for a group to study together and write up a shared notes file (say in Google docs), but nobody should modify that document after one of you starts the exam. At core, take the exam on your own without assistance from others. Act as if this were an in-person exam
The exam will be self-contained, in that it won't expect that you remember any details of specific examples from class or lab.
**What if I need a clarification during the exam?** The exam will contain an area where you can describe any assumptions you made while answering the questions.
**What if my computer dies or internet crashes during the exam?** If you are still able to see the questions (internet goes out), write your answers on paper and email them to the HTA list when your internet is back. If your computer restarts and Gradescope won't let you back in, email the HTA list (which also reaches Milda and Kathi) and we'll reopen the exam for you. Basically, alert us to the problem ASAP and we'll deal with it (though we are not online 24/7).
## What do you need to know?
The exam will cover material up through the Friday, March 4th lecture material on hashmaps.
**Data Structures:** We expect that you know the data structures we have studied so far (Linked Lists, Arrays, Dynamic Arrays/ArrayLists, Doubly-Linked Lists, Trees, and essentials of HashMaps). You should be able to choose from or argue for or against these data structures for a given problem. You should be able to talk about the running times for operations that we have discussed on these data structures (at the level of big-O, not line-by-line time annotations).
For those data structures that you implemented on homework or projects, we expect you to be able to discuss roughly how those implementations work (but you won't be asked to reproduce or remember the corresponding code in detail).
The exam will **not** include details of the runtime on Hashmaps.
**Object-Oriented Design and General Programming:** You should understand
- what classes and interfaces are and when they get used.
- what it means to extend a class or implement an interface
- which class a computation should be in
- how constructs like loops, assignment operations, and exceptions work
- how recursion works across related classes
- when to throw (or catch) an exception
**How Memory (Heap) and the Environment Work:** You should understand how different constructs impact each of the environment and the heap. You should be able to draw the heap contents that result after a sequence of lines of code and talk about how objects in the heap are accessed through different names and expressions via the environment. You may be asked to upload a picture or PDF file of a memory diagram.
**Programming with Mutable vs Immutable Lists:** You should understand the difference between using an immutable (functional/our LinkList) list and a mutable (Java built-in lists) from a programmer's perspective. For example, you should be able to discuss the difference in how a piece of code would run depending on which kind of list was being used.
**The key ideas from assignments and project 1:** We expect that you understand how your solutions to the hwks and project actually work. You won't be expected to reproduce code, but we could show you part of a homework/project solution and ask what that part does or why it was important to solving the problem.
## What do you NOT need to know?
- Syntax details -- you won't be asked to write more than a line or two of code, and even then, missing bits of syntax won't matter
- Specific examples or code from class, homeworks, or lab -- the exam will be self-contained, rather than say things like ``remember the Dillos? ...''
- The exact names of built-in methods on Java data structures -- as long as we understand what operation you are trying to do, you'd get credit for your answer.
- How to define exception classes
- How to annotate code line by line for runtime
Basically, this isn't a memorization exercise, or paper-based versions of questions that would be more easily answered in a programming environment. This is bigger picture than details of code.
## What sort of questions might be asked?
Here are examples of what you might be asked to do (this list is not exhaustive):
- Given a problem scenario, describe the tradeoffs among various data structures (that we’ve covered) for use within the problem. For this, you would want to know the running time of standard operations of various data structures.
- Given a collection of classes and interfaces, discuss whether the various methods and variables are in the right places, or whether they should be organized differently.
- Given a partially-filled-in heap, show how it would change after running a given couple of lines of code.
- Given a piece of code, answer questions about what it would do.
- Explain what aspects of a data structure implementation or problem statement achieve certain goals (e.g., what part of an immutable list implementation allows adding an element to be constant time).
As you can see from these examples, the focus here is on concepts -- do you understand the material we covered so far this semester in a way that lets you make good design decisions?
## How will this be graded?
There will be partial credit on all questions.
The exams are graded manually, though we will leverage Gradescope's automatic checking of multiple-choice and fill-in the-blank answers as a first pass. Gradescope can't handle partial credit or variations in answers: for example, if we asked you which kind of list to use and you typed "array list" whereas our default answer to Gradescope was "arraylist", Gradescope will mark it wrong even though it is fine. Manual grading will correct these.
But, if Gradescope shows you an initial score after you take the exam, be aware that that score will be based only on what Gradescope could correctly grade automatically. Do not panic. Your real grade will be higher (and cannot be lower).