Upcoming Exams
Please visit link shown below.  Note that you must be on campus network to access the link.  If you are not on campus you will need to VPN in to the campus network before you can access.  The link is behind the campus firewall for security reasons.
To register for this exam please visit this link: https://ape.compsci.ewu.edu/ape/view/home/
  • If you require DSS accommodations, email tcapaul@ewu.edu (type of accommodations should be specified).  Please request DSS accommodations no later than one week before the exam.


  • Linux Operating System
  • Editors
    • JGrasp
    • GEdit
    • Eclipse
  • JDK 8.0 (1.8.x)
  • Java API documentation
  • No Internet access
  • No notes or texts allowed
  • The exam is now a Test Driven Design Exam where you are writing code based on the provided tests


The Computer Science Department has determined that the distribution of points within the exam will be as follows:

  • General Program Design: 30%
    • Penalty points can be assessed in this category for grossly inefficient code.
    • Text file input and output
    • Exception handling associated with files
    • Order-related manipulations -- you will need to write a sort routine without making calls to any Java API sort methods.  You may be asked to write a sort on an Array, ArrayList, or Linked List.
  • Data Abstraction and Class Design: 30%
    • Extending a class
    • Overriding a method, such as toString
    • Creating a class (could be as a super class, an abstract super class, or a sub class)
    • Accessing super class methods and/or fields
    • Implementing an interface, such as Comparable, Comparator, Iterator, or an exam specific interface
  • Linked List Manipulation: 20%
    • This will be a non-circular singly-linked list.  Some operations will be on a list with a dummy/header/buffer/sentinel node.  Some operations will be on a list without such a node.
    • Operations will be chosen from the following list.
      • Adding a node(s) — all cases (to an empty list, to a non-empty list, at front, at back, in the middle)
      • Remove a node(s) — all cases (based on index, based on Object equality, from front, from back, from middle)
      • Retrieve an item based on index or some other criterion (such as maximum or minimum).
      • Order-related manipulations, such as addOrdered and sort, may be exemplified within the linked list.
      • Generate a sublist, based on some criterion or criteria.
  • Recursion: 20%
    • Simple recursive methods to accomplish a task, which may or may not be list related. Examples would be printing a linked list in reverse, computation of factorials, and other recursive algorithms at the level of those covered in Programming Principles I and II and in Data Structures.
    • An example you probably haven't seen. AdditiveSquares.java


An expanded list of topics follows.  You should make sure you are proficient in each area to ensure success.

  • Linked list utilization (a subset of the below items will be required)
    • insert (front, back, in order)
    • delete (front, back, specific item)
    • print
    • traverse
    • sort(you must write the code, unless otherwise specified)  Note, however, that you may be asked to do array-oriented sorting.
    • build a sub-list from an existing list
    • utilize a dummy head node — or not utilize one
  • Basic recursion (like using recursion to traverse a linked list in some form, or print the contents of a linked list in reverse order)
  • File input and output
    • Input via a Scanner object
      • any input file will be well formed
      • know how to stop when end of file is reached
      • remember to close file when finished
      • know how to utilize your Scanner object to check for specific kinds of data (e.g. hasNextDouble()) before reading the data (e.g. nextDouble())
      • know how to deal with different exceptions that can occur when opening an input file
    • Output via PrintWriter/PrintStream
      • know how to format output (decimal points, columns, etc.)
      • remember to close output file when finished
      • know how to deal with different exceptions that can occur when opening an output file
  • Inheritance
    • Understand super / sub class relationship
    • know how to override methods to enable polymorphic behavior
    • understand abstract classes and interfaces
    • know how to create a sub class from super class
    • know how to call base/parent/super class methods (requires use of keyword super)
    • understand visibility (private versus protected in a super class)
    • know how to call super class constructor (requires use of the keyword super)
  • Comparable interface
    • know how to implement for a given class, including multiple-key comparisons
    • know how to utilize when searching and sorting (i.e. call the compareTo method)
  • Basic exception handling
    • know how to designate a section of code as possibly throwing an execption (via a try block)
    • know how to handle and exception (via a catch block)
    • know how to propagate an exception from a method (by using throws and the end of the method signature)
    • know how to generically handle an exception (use Exception to do this)
  • toString
    • know how to implement properly for a given class
    • know how to utilize an existing toString provided by a class (recall that it returns a String representing data in the object you'd like printed and that it is automatically invoked whenever you try and print an object using print, println, or printf with the "%s" format specifier)

This exam covers material very similar to that in the warm-up assignment in Data Structures (CSCD300), or possibly the warm-up assignment and the second programming assignment.  All material on the exam is introduced in either CSCD 210 (Programming Principles I) or CSCD 211 (Programming Principles II).

You will not have to start from scratch on the exam.  You will be given a (previously) working program that has had functionality removed.  It is your job to reinsert that functionality.  For the most part, this will be done via adding methods.  You will be told in some way what methods are required.  You may be asked to write a class in its entirety.  However, if you are asked to write an entire class the amount of code you will be required to write is not intended to be “large.”  Questions will be asked in “parts” that can be done separately.  This means if you mess up on part 1, and part 2 requires something from part 1, you will not need to have completed part 1 successfully to do part 2.

Problem Areas Identified From Previous Exams

  • Not following directions
  • Not reading the specifications in their entirety — make sure you read all directions before you begin writing code.  A prime example is ignoring specifications related to whether the linked list does or does not have a header/sentinel node.
  • Not placing files in specified location
  • Not naming files as specified
  • Modifying files that were to be left alone
  • Unfamiliarity with keywords in Java required for basic things like inheritance (extends) and interface use (implements)
  • Spending too much time on one item
  • Inability to implement simple recursion

Basic strategies you should use

  1. Stub the methods out that you have to write, then fill them in with useful code when you are ready
  2. Read the directions carefully, then look at the sample input and output before you begin writing code
  3. Comment out items that don't compile so you can test other parts of your solution (this includes methods you can't get to work and method calls that may occur from elsewhere — like in the main method of the program).  Note, however, that your code will be tested using the original tester file, not your edited one.
  4. For linked lists, make sure you can write any of the fundamental methods that the Java API LinkedList class contains.

Practice Exams

NOTE: These are sample exams — do not expect the exam you take to be formatted in precisely the same way, with the same number of classes, methods, etc. — this is just for practice and to give you an idea of what to expect.  The amount of code you are asked to write on these exams is similar to the amount you will have to write on the actual exam.  The topics on these exams are a selection from the list given at the top of this web page; the actual exam you take may have topics not addressed on this exam, but which are a part of the list above.


  • Any student requesting accomodations based on DSS, must send an email to tcapaul@ewu.edu at least one week prior to the exam.
  • You are allowed to take the APE only three (3) times without passing
  • It is your responsibility to register for the exam as specified above. If you show up to the exam without registering, you may be turned away
  • Registration is done through this page
  • Be sure and bring your Student ID with you to the exam