Midterm Review Guide
The midterm exam is open book, but not open notes. You may bring one
page (both sides) of notes. Bring
a calculator if you want one for the program trace computations.
Terms and Concepts
Java source code, compiling, Java byte code,
class, object, instance variable (data member),
method (procedure), event, constant (numeric,
character, string, boolean), variable (name, value,
address, size, range), primitive datatype (int,
double, char, boolean), operators (arithmetic,
comparison, logical, assignment, string concatenation),
structured progamming (sequence, repetition (while
and for loops), decision (if..else)),
static methods, object methods, constructor.
Predefined Classes
VendingMachine, String, Coin, JOptionPane, Math,
Applet, Color, Graphics.
Predefined Object
System.out.
Be Able To
- Answer short answer, True/False, or multiple choice questions.
You will need to give reasons to support your answer for True/False
or multiple choice questions.
- Construct the program trace and predict the
output of a Java program.
- Use the predefined classes to create
objects and use their methods (static or nonstatic).
- Write a Java program that will input a single case, do a computation,
and print the answer. This might involve string processing.
Possible String Processing Problems
- count the number of characters of a certain type in a string,
- check for the existence of a character of a certain type,
- check that all characters in a string are of a certain type.