Final Exam Topics
CIS 211 - Computer Science II - Winter, 2003 - A.
Hornof
You will need to write Java code and Unix and/or DOS commands.
The final exam will include but is not limited to the following
topics.
Material from before the midterm:
- All class and variable modifiers, including "abstract" and
"interface", visibility modifiers, and class methods versus
instance methods.
- L&L Chapters 7 and 8, though you'll also need to know the
content of all of the chapters in order to write working Java
code.
- Exceptions: Throwing, catching, writing your own.
- Inheritance: How to use abstract classes and interfaces. What
kinds of restrictions they impose.
- ArrayList: How to create one, add items, remove items, and
traverse it.
- How to create and use packages. How to set up a CLASSPATH in
Windows, DOS, and/or Unix.
- Static classes and variables. What are they? How do they
work?
- What is a singleton? How do you create one? This is discussed
in Project 3, and is shown in the solution to Project 3.
- All of the reading assignments on the course "Topics and
Reading" web page, including compiling from the command line,
basic Unix, and everything else listed. Be sure to log onto a Unix
system and read the "man" page for "chmod".
- Know how to read the entire contents of an "ls -la" command
when issued at the Unix command prompt, and how to change
permissions on folders and files.
Material since the midterm:
- The basics of how to build a simple GUI using Java Swing and
the convention shown in the class examples and in the course web
page under "Sample Swing Code." In this convention, the entire GUI
is set up within the constructor of a JFrame object.
- L&L Chapter 9, and the graphics track throughout the
entire book.
- L&L Chapters 7, 8 and 9, and the graphics track throughout
the entire book, though you'll also need to know the content of
all of the chapters in order to write working Java code.
- How to add listeners to JButton, JTextField, and JFrame
objects.
- The model-view-controller architecture. You should be able to
identify the appropriate distribution of labor and communications
among the model, view, and controller of a system.
- Unified Modeling Language (UML) diagrams. You should be able
to understand the basic components of UML class and interaction
diagrams, and write the corresponding code.
- Both chapters in the reserve reading for the class in Knight
Library. From "Debugging", you should know the scientific approach
to debugging, a number of useful testing debugging techniques, and
common debugging pitfalls. From "Design Patterns," you should know
what design patterns are, why they are useful, how they differ
from programming constructs built into programming languages, what
are the essential components of a design pattern, and two or three
examples of specific design patterns.
The best way to prepare is to give yourself problems that
incorporate the above concepts, such as the following:
- Write a small Swing program that would allow the user to type
in a few words followed by the "Enter" key. The program would
display the string elsewhere in the the window. Clicking on the
close-window button quits the program.
- Design a small Java program that uses the MVC architecture and
works as follows: The user can type in a command to "add book" and
the word "book" gets added to a collection of words. The user can
then type "show" and the entire collection of words gets output.
Use the MVC architecture and a clearly defined public interface so
that the View could either output the words to a file or the
display and the other two components would not know or care, and
so that the Model could store the words in an ArrayList or any
other data structure and the other components would not know or
care.
- Write a Java program that takes two filename arguments from
the command line, quits with an error if two arguments are not
provided, and then proceeds to copy each word in the first file to
the second file, quitting with an error if the first file can't be
read or the second file exists or can't be written.
After you write the problem, you should close all your books and
notes, write the code as best as you can using paper and pencil, and
then open your books and type it into the computer, fixing it until
it is perfect. Then, close all your books and notes and again write
it using paper and pencil. Continue until you can write it perfectly
from your knowledge of Java.