Be sure to bring your WISC ID along with #2 pencils to complete each of the multiple choice CS302 Exams.  No electronic devices or reference materials will be permitted during the exams.  We have provided the following general Study Tips.

Quick Links: Exam1 | Exam2 | Final Exam


When: Thursday, February 23rd 5:00-7:00pm


Note that several building entrances are locked between 5-6pm, and that you may need to find an alternate entrance when arriving late to an exam.  We recommend that all students plan to arrive 15 minutes early to avoid unnecessary hassle and stress.

Sample Exam Reference + 2 Sample Questions

What: You are responsible for all material covered in lectures, zyBooks, team labs 1-4, and programming assignment 1. Some of the covered topics include:

  • The Basics
    algorithm and pseudocode, IDE, source code -> compiler, class files -> virtual machine, class and main method, use of braces, statements, parameters, string, System.out.println and print, compile-time (syntax) vs. run-time (logic) errors, exception, debugging and tracing
  • Elementary Programming
    declaring and initializing variables, numeric data types (int, double) and overflow, naming rules and conventions, reserved words, comments, assignment operator (=) and statement, input and Scanner class, import statement, defining constants with final, expression, operator, operand, arithmetic operators (* / + – integer/ %), operator precedence, inc/decrement operators (++ –), compound assignment (+= -= *= /= %=), cast operator, concatentation, string input with next and nextLine
  • Selections
    conditions, boolean type and true/false values, relational operators (< <= > >= == !=), if statements (if, if-else, if-else-if forms and flowcharts), switch statement (including break statement and default case), boolean variables and operators (! && ||), truth tables, == vs. equals, nested branches, dangling else problem, short-circuit evaluation, DeMorgan’s Law, input validation (hasNext), test cases (normal, abnormal, boundaries) NOT INCLUDED: Section 3.14, Conditional Expressions
  • Mathematical Functions, Characters, and Strings
    Math class, String class, String methods (such as length, charAt, substring), char type, calling instance vs. calling static methods, escape sequences (\n \t \\)
  • Loops
    repetition idea, repeat while true, infinite loops, off-by-one errors, while loop, count- vs. event-controlled loop, definite vs. indefinite loop, for loop, scope of for loop counter, do loop, post- vs. pre-test loop, user input validation, sentinel value termination, algorithms (such as summing, average, counting matches, comparing adjacent values), nested loops
  • Arrays
    declaring and initializing arrays, initial values list and filling arrays, accessing elements and indexing from 0, length property, bounds checking and ArrayIndexOutOfBoundsException, array reference and memory diagrams for arrays, partially-filled arrays, array algorithms (such as linear search, removing/inserting, printing with Arrays.toString(), copying with Arrays.copyOf(), passing arrays to and returning arrays from methods;
  • Multidimensional Arrays
    two-dimensional arrays, passing/returning, 2D arrays with variable row (second dimension) lengths;
  • Random Class
    seed, nextInt(), next(), generating random integers for a specified range, class (static) methods, calling object, Java API.


When: Thursday, April 6th 5:00-7:00pm


What: You are responsible for all material covered in lectures, zyBooks, labs 1-8, exam1, and programming assignments 1 and 2. Some of the covered topics (since Exam1, this is a comprehensive exam) include:

  • Methods
    call-execute-return sequence, declaring and calling (static) methods, parameter passing and pass-by-value (argument values stored in parameter variables), returning values and return statement, void methods, call stack tracing, stepwise refinement and incremental coding, stubs, local variables and variable scope;
  • Objects and Classes
    (instantiable) class vs. object (aka instance), class diagram, object diagram, constructors, creating objects using new, defining instance methods and declaring instance fields, default values for instance fields, interface vs. implementation, public vs. private, accessors and mutators, boolean methods, overloading, main (or driver or tester) class, object references and null, shared references (aka aliases), passing/returning references, calling instance methods, toString() method, instance constants, class (static) constants, class (static) variables, class (static) vs instance (non static) methods, arrays of objects, partially filled arrays of objects and null, initiallizing the array vs. the objects in the array, this reference;
  • Object-Oriented Thinking
    object-oriented programming (OOP), encapsulation, tracing OOP method calls and memory diagrams, wrapper classes and auto-boxing, wrapper classes for each primitive (ie. Character class) and named constants, equals vs. ==;
  • ArrayLists
    ArrayLists, type parameter for generic class, methods to add/remove/find/size/etc., copying with the constructor.

Final Exam:

When: Wednesday, May 10th 2:45pm-4:45pm


Sample Final Exam Reference

What: You are responsible for all material covered in lectures, zybooks, all labs, and all programming assignments. Some of the covered topics (since Exam2, this is a comprehensive exam) include:

  • Inheritance
    inheriting from Object, instanceof operator and casting, toString and equals, overriding (redefining) inherited methods
  • Exception Handling and Text File I/O
    text files, file names – paths (absolute vs. relative) – directories (root vs. current, “.” vs. “..”), import java.io.*, file output using PrintWriter, file input using Scanner with File class, FileNotFoundException and IOException, close methods, InputMismatchException, command line arguments, exception mechanism and messages, exception classes and objects, ArrayIndexOutOfBoundsException and IndexOutOfBoundsException, NullPointerException, ArithmeticException, throwing exceptions (throw statement), catching exceptions (try-catch statement), exception handlers, finally clause, exception class hierarchy, checked vs. unchecked exceptions, checked exceptions and throws clause, defining your own exceptions with extends clause,
  • Interfaces (and not Abstract classes)
    implements clause, Comparable interface, compareTo method (note that abstract classes will not be covered on the final exam)