CS 112
Lecture 11
Midterm Review
Using an old
exam as model. Not
all questions apply (there will be no questions on passing
functions as parameters, although we did it).
Review
Arithmetic expressions. Postfix notation.
Today, evaluation, using a
stack.
Applet. Look
on the Java console.
This part will be on the exam and the next homework will be based
on it.
Using tested object files; Libraries
- Thoroughly testing the IntStack class. Example: the
BadStack. Then, the
GoodStack.
- Using a good stack, without ever seeing the actual
code. Example:
ObjectStack.
- What are libraries? Why do we include header files?
Example, my own stack library
StackLibrary.
There will be an exam question about this. I recommend that you
study the examples done in class and make sure you understand
what is going on.
In class exercise
-
Copy the IntStack files from this directory (use the Unix cd and cp
commands to get there and to copy the files):
../../handout/Stack/
or
~112a/handout/Stack
- Use the testdriver you wrote for Hw5, put it in the same
directory with these files.
- Compile using the given object files,
using only one compilation line to construct the
executable code. You will design the Makefile, using the model we
did in class.
- Execute, test. Does it run correctly? Is my implementation
similar to yours? Does it matter?
If time allows, I will answer specific questions about the
midterm made available to you.
Ileana Streinu