Timeline
Thurs., April 26th: Programming exam. See room assignments.
Tues., May 1st: Written exam review session, in class meeting.
Thurs., May 3rd: Written exam. See room assignments.
Study Guide
Material
The second set of exams will cover all of the material in this course, with an emphasis on the second half of the semester. The emphasis will be on content from the first TOY lecture ("A Computing Machine") up to and including "Combinational Circuits" and all associated readings. Note, content from the last two lectures (and associated readings), "Central Processing Unit" and "Programming Languages", will not be tested.
As with the first programming exam, the second programming exam will involve writing a small program. The best way to prepare for the programming exam is to practice with previous exams.
As with the first written exam, the second written exam will test content from the video lectures and textbook. The best way to study for the written exam is by doing previous exams and rewatching lecture videos.
Review Session
The course staff will hold a written exam review session on Tuesday before the exam, where we will explain answers to previous exam questions.
You can also ask course staff about previous exam questions in office hours or on Piazza.
Checklist
The following list is a summary of the main topics on the exam, for your use as a checklist while studying. Do you understand the main ideas behind each of these topics? Do you feel confident answering previous exam questions on these topics? If not, rewatch the appropriate video lectures and reread the relevant sections in the book.
Note, this checklist is not an exhaustive list of all possible exam questions. Your exam may have a topic that is not explicitly listed below, but related.
- Chapter 3: Object-Oriented Programming
- using data types (declaring variables, invoking constructors and instance methods)
- defining data types (instance variables, constructors, instance methods)
- reference types vs. primitive types
- encapsulation (public/private)
- immutability
- modular programming
- Chapter 4: Data Structures
- analysis of algorithms (empirical and mathematical)
- sorting and searching
- linked structures (linked lists and binary trees)
- stacks and queues
- symbol tables and binary search trees
- enhanced for loop to iterate over items in a collection
- which data structure is appropriate for which application?
- Chapter 5: Theory of Computing
- regular expressions (union, concatenation, closure, parentheses, wildcard, + operator)
- DFAs (tracing, understanding, and designing)
- Turing machines (understanding theory implications for universality and computability but not tracing or designing) Note, tracing and designing Turing machines appears on some previous exams but will not appear on your exam.
- universality, Church–Turing thesis, extended Church–Turing thesis, computability, halting problem (i.e. unsolvable problems)
- intractability (P, NP, NP-complete, polynomial-time reductions)
- Chapter 6: A Computing Machine
- number representation (binary, hexadecimal, two's complement)
- TOY instruction set
- tracing and understanding small TOY programs
- von Neumann architecture
- Chapter 7: Building a Computer
- Boolean logic
- AND, OR, and NOT gates
- sum-of-products circuits
- ripple–carry adder
- no multiplexers or decoders
- no sequential circuits or architecture
APIs
You should be familiar with the following static and instance methods. If we ask you to use other methods/libraries, we will describe how they work.
Math.sqrt() Math.max() Math.min() Math.abs() Math.sin() Math.cos() Math.exp() Math.pow() Math.log() Math.random() Math.round() Math.ceil() Math.E Math.PI
Integer.parseInt() Integer.MAX_VALUE Integer.MIN_VALUE
Double.parseDouble() Double.POSITIVE_INFINITY Double.NEGATIVE_INFINITY
StdOut.println() StdOut.print() StdOut.printf() |
StdIn.readInt() StdIn.readDouble() StdIn.readString() StdIn.isEmpty() StdIn.readAll()
StdDraw.line() StdDraw.point() StdDraw.circle() StdDraw.square() StdDraw.setXscale() StdDraw.setYscale() StdDraw.clear() StdDraw.show() StdDraw.picture() StdDraw.polygon() StdDraw.filledPolygon() StdDraw.rectangle() StdDraw.filledRectangle()
String:
- charAt()
- substring()
- matches()
- indexOf()
- length()
- equals()
- compareTo()
|
Picture:
- width()
- height()
- get()
- set()
- show()
Queue:
- isEmpty()
- enqueue()
- dequeue()
- size()
- iteration
Stack:
- isEmpty()
- push()
- pop()
- size()
- iteration
ST:
- put()
- get()
- contains()
- size()
- iteration
|
Programming Exam
Room Assignments
Seating is limited. If you go to the wrong room, there will be a 10% grading penalty.
Precept |
Room |
P01-P02 |
Friend 006 |
P03–P12 |
McCosh 50 |
P13-P15 |
Friend 101 |
Policies
Please read our policies carefully to ensure that you are prepared for the programming exam:
- You will have 50 minutes to complete the exam. If you have been approved for extra testing time accommodations by the Office of Disability Services, please fill out this form.
- The exam is open course materials, which includes the course textbook, the booksite, the course website, your course notes, and code you wrote for the course. Accessing other information or communicating with a non-staff member (such as via phone, email, instant messenger, text message, Facebook, etc.) is prohibited.
- Unless you tell us otherwise, you will be taking the programming exam on your personal laptop. It's your responsibility to ensure that your laptop is fully charged before you begin the exam. There are very few power outlets available in the exam rooms. If your laptop cannot hold a charge, please fill out this form.
- If you need to take the exam on a COS cluster computer instead of your laptop, please fill out this form. We strongly advise you to practice using the lab in advance of the exam; make sure you know how to use a cluster machine and set up a directory for the exam on your university H: drive that includes a copy of the necessary files. More info can be found here.
- We advise that, in advance of the exam, you create an empty directory and download copies of the following files: ST.java, Stack.java, and Queue.java.
- If there is an extraordinary circumstance that prevents you from taking the exam at the designated time, please fill out this form. Makeups will be granted only with the recommendation of a Dean or Director of Studies and course staff approval.
Written Exam
Room Assignments
Seating is limited. If you go to the wrong room, there will be a 10% grading penalty.
Precept |
Room |
P01-P02 |
Friend 006 |
P03–P12 |
McCosh 50 |
P13-P15 |
Friend 101 |
Policies
The rules for the exam are as follows:
- You will have 50 minutes to take the exam. If you have been approved for extra testing time accommodations by the Office of Disabilities, fill out this form.
- The written exam is closed book, closed notes, and closed computer.
- You may bring one two-sided 8.5-by-11 sheet with notes in your own handwriting to the exam.
- You may not use any kind of calculator, phone, computer, or headphones during the exam.
- If there is an extraordinary circumstance that prevents you from taking the exam at the specified time, please fill out this form. Makeups will be granted only with the recommendation of a Dean or Director of Studies and course staff approval.