Sample final exam(s) posted here are intended to be similar to the actual final. The number of problems and type of problems on the actual exam will be relatively similar to what is seen on these practice exams, though we do not promise that it will be exactly the same in length or in difficulty.
Section Handouts and CodeStepByStep lecture practice problems (on the schedule page) are also great ways to practice relevant material.
The logistics for the final exam are the same as for the midterm exam (except for the updated syntax reference sheet above); please see the midterm logistics section for more information.
The final focuses on material taught since the time of the midterm, including the following concepts listed below. However, programming is inherently cumulative in that new topics build upon old ones. So you may be asked to solve problems that involve, though not necessarily focus primarily upon, past topics such as strings, int, double, boolean, random numbers, loops, if/else, parameters, return, expressions, variables, constants, file input with Scanner, and so on. Note that you may be asked to read code (look at a piece of existing code and answer questions about it, such as writing its output) and/or write code (write a piece of code such as a method or short program that solves a given problem).
Pass-by-value vs. pass-by-reference: demonstrate your understanding of objects vs. primitive values (e.g. passing objects, primitives, or arrays as parameters)
GraphicsPrograms: write Java code to implement a graphics program with certain behavior using Stanford's libraries; this may include drawing shapes such as GRect, GOval, etc., animation, and/or handling mouse events. (Though this topic was covered before the midterm, Breakout, which gave practice with this, was due after the midterm)
Arrays: interpret/write code that uses a 1D array to solve a problem.
2D Arrays: interpret/write code that uses a 2D array (possibly from the pixels of a graphical image, possibly not) to solve a problem.
Collections: interpret/write code that uses the collections
HashMap to solve a problem.
Objects and Classes: interpret/write a class and/or add behavior to an existing class.
Inheritance: interpret/write a class that extends another class, such as GCanvas.
Interactors: interpret/write a program that uses GUI components (buttons, labels, text fields) and events to produce a given behavior.
The following concepts will NOT be tested on the final:
Karel the Robot
Material from the "Life After CS 106A" lectures
Graphical shapes not used in lecture/section, such as
converting numbers to/from other bases, such as binary or hexadecimal
do loops and the
continue statement (
while loops may be needed, though)
static methods or data (other than
static final constants)
throwing exceptions with the
any Stanford library functionality not explicitly taught in class, section or homeworks
anything else not explicitly covered in lecture, section or homeworks
The recommended exam strategies for the final exam are the same as for the midterm; please see the midterm exam strategies section for more information.