CPSC 225, Spring 2012
Information About the Final Exam

The final exam is scheduled for 8:30 AM on Tuesday, May 8.

The final exam for CPSC 225 is cumulative, with some emphasis on material covered since the second test. The new material includes: networking (Section 11.4); threads (Chapter 12); and advanced GUI programming (Sections 13.3 and 13.4), especially events and the Model/View/Controller design pattern.

The final exam is worth 20% of the grade for the course. It will be 6 or 7 pages long, with a format similar to other tests.

Here are some terms and ideas covered since the second test:

network connections and the Socket class
the constructor: new Socket(host,port)
the ServerSocket class
the constructor: new ServerSocket(port);
socket.getInputStream() and socket.getOutputStream()
clients and servers; how to implement them with Socket and ServerSocket
the basic internet protocols, TCP/IP
the HTTP protocol
basic format of HTTP request headers and HTTP response headers
mime types and the Content-Type header
basic operation of a web server and how it can be implemented

creating and starting threads; the run() method in a thread
race conditions and deadlock
the synchronized statement
synchronization lock in every Object, and how it is used in synchronization
mutual exclusion
volatile variables
multiprocessing: dividing up a job among available processors
thread pools

uses for threads:
   animation (as an alternative to Timers)
   background computation (for a responsive GUI during a long computation)
   parallel processing (for speeding up computation)
   dealing with blocking I/O (using a thread to receive network messages)
blocking queues
ArrayBlockingQueue<T> and LinkedBlockingQueue<T>
the blocking operations queue.put(x) and queue.take() on a blocking queue
the producer/consumer problem and how it is solved by blocking queues

design patterns
the MVC (Model/View/Controller) pattern
relationships among the model, the view, and the controller
how events are used in implementing the MVC pattern
using multiple views of the same model
ListModel and how it is used with JList
"loose coupling" between components of a complex system

Here are some of the most important topics from earlier in the term:


analysis of algorithms
Big-Oh and Big-Theta notation
worst case and average case run times
run-time analysis of operations on stacks, lists, trees, etc.

exceptions and exception classes
throwing an exception
checked exceptions and mandatory exception handling
the full try..catch statement, including the finally clause

recursion and recursive methods
base case of a recursion
infinite recursion
examples of recursion such as maze-solving, blob-counting...

linked data structures
linked lists; traversing a linked list with a "runner"
adding and deleting nodes in a linked list

ADT (Abstract Data Type): what they are and why they are important
the "queue" and "stack" abstract data types
operations on stacks and queues (push/pop and enqueue/dequeue)
implementation of stacks and queues as linked lists
implementation of stacks as arrays
postfix expressions and how they are evaluated using a stack

binary trees
pre-order, in-order, post-order traversal of binary trees
recursive processing of binary trees
expression trees

generic programming and generic classes in Java
the JCF (Java Collection Framework)
Collection, List, ArrayList, LinkedList, Set, TreeSet, HashSet
for-each loops for traversing a collection
Map, TreeMap, HashMap
hash tables and hash codes

input versus output streams
binary versus character streams
files and the file class
designing file formats

You can also see the review sheets for the two in-class tests,
which are available on-line.