CPSC 225, Spring 2009
Information About the Final Exam


The final exam for the course will take place at the time scheduled by the Registrar's office: Monday, May 11, 8:30--11:30 AM. The exam is in our regular classroom. The exam counts for 20% of the overall grade for the course. It will be five or six pages long and should take about one-and-a-half hours (but you can use the full three hours if you need it). The format will be the same as the two previous tests, including a mix of programming questions and essay-type questions. (If you don't expect to write an essay on the Model/View/Controller pattern and how it relates to events, you haven't been paying attention for the last couple of weeks.)

The final exam is cumulative, with some emphasis on the material that was covered since the second test. The material that has been covered since the second test includes topics from Chapters 11 (streams, files, and networking), from Chapter 12 (GUI programming), and from Section 8.5 (threads). We did not cover any of these sections of the book in their entirety. More specifically, here are some of the terms and ideas that you should understand for this test:

parallel programming and multiprocessor computers
threads
creating threads using a subclass of the Thread class
the run() method of the Thread class
starting a thread using its start() method
the difference between starting a thread and calling its run() method
the need for synchronization
race conditions
synchronized methods
mutual exclusion
deadlock

streams
character streams vs. byte streams
streams as Abstract Data Types and the importance of the stream abstraction
abstract stream classes: 
         Reader, Writer, InputStream, OutputStream
wrapping one stream in another, for example:
         new BufferedReader(new FileReader(file))
the PrintWriter class; the print and println methods
the Scanner class; methods such as next(), nextLine(), hasNext(), nextInt()...
files and the File class
reading and writing files
designing a file format for saving data to a file

networking
IP addresses
host names, and translation of host names into IP addresses
port numbers
URLs
the client/server model of network programming
the ServerSocket class; the accept() method
the constructor "new ServerSocket(portNumber)"
the Socket class; the getInputStream() and getOuputStream() methods
the constructor "new Socket(host,port)"
using a socket to communicate over a network
operations that block
why threads are often needed in network programming

the BufferedImage class
the constructor "new BufferedImage(width,height,type)"
the BufferedImage types BufferedImage.TYPE_INT_RGB and BufferedImage.TYPE_INT_ARGB
copying a BufferedImage to a Graphics context with g.drawImage(image,x,y,null)
getting a Graphics2D for drawing to a BufferedImage with the createGraphics() method
resources (but not the details of loading resources)
transparency and the alpha component of a color
making translucent colors with the constructor "new Color(r,g,b,alpha)"
radio buttons:  JRadioButton and JRadioButtonMenuItem
radio button groups and the ButtonGroup class; the add() method
icons and ImageIcon
using icons on buttons and menu items
using HTML text on buttons and labels
actions and the AbstractAction class
programming an AbstractAction
using an AbstractAction to construct a button or menu item, and why you might want to do it
toolbars and the JToolBar class
adding a toolbar to a window, and adding items to the toolbar

the MVC (Model/View/Controller) pattern
how events are used in the MVC pattern
how using the MVC pattern can make complex GUIs easier to develop and more robust
components that use the MVC pattern: JList, JTable, and text components
how a JList uses a ListModel to hold its data

And here are some of the more important ideas from earlier in the semester that you will want to review:

exceptions
checked exceptions and mandatory exception handling
the try..catch..finally statement
run-time analysis of programs
"big-Θ" and "big-Oh" notation

recursion and recursive methods
base case and recursive case of a recursion
maze-solving, blob-counting, and similar recursions

pointers and linked data structures
linked lists
traversing a linked list; "runners"
operations on linked lists; adding and deleting nodes
ADTs (Abstract Data Types)
stacks and queues, and the operations that define them as ADTs
implementing a stack as a linked list or as an array
binary trees, and how to implement them as linked data structures
traversing a binary tree; preorder, inorder, and postorder traversals
binary sort trees
recursive processing of trees
expression trees
postfix expressions; using a stack to evaluate a postfix expression

generic programming
parameterized types
wrapper classes for the primitive types: Integer, Double, etc.
the JCF (Java Collection Framework)
collections; lists and sets; maps
iterators
using "for-each" loops to traverse collections
hash tables
ArrayList<T> and LinkedList<T>
TreeSet<T> and HashSet<T>; the add(), contains(), and remove() methods
TreeMap<K,V> and HashMap<K,V>; the put() and get() get methods
the Comparable<T> interface
the hashCode() method in the Object class

CS 225, Spring 2009