CS 3723/3731 Programming Languages
Spring 2003 -- Review for Final Exam
Exam is Tuesday, 6 May 2003
The final exam will be comprehensive, but will emphasize topics since the
mid-term exam. The final will be worth about 50% more than the mid-term.
Previous review (for Mid-term):
Mid-term Review.
Main Additional Topics
Since the Mid-term, Based on Recitations:
- The Lisp Language (2 recitations):
- Lisp Rec 1:
Basics and Functions.
- Lisp Rec 2:
Functions and mapcar
- What you should know:
- Lisp S-expressions (definition).
- Lisp notation for use of functions (prefix, fully
parenthesized), that is, (+ (* 2 3) (/ 8 4)).
- Functions to work with Lisp lists: car,
and cdr to take lists apart and
cons to create lists or put lists together.
Also append and list.
- Basic (recursive) Lisp evaluation.:
Given a list to evaluate, separate off the car, which should
be a Lisp function. Then recursively evaluate each of
the following items in the list (those at the top level).
Finally evaluate function with those evaluated items as
its actual parameters.
- True (t) and false (nil
in Lisp, and predicates: functions that return
t or nil.
- Lisp's version of if-the-else: cond
and its syntax -- not evalutated the same way as an ordinary
Lisp S-expression. (The successive predicates in the
cond are evaluated in order until one
is found that returns t.)
- The syntax for Lisp function definition -- not evaluated
like an ordinary Lisp S-expression, but absorbed to provide
a new user-defined function.
- Understanding Lisp functions and writing simple recursive
Lisp functions.
- Simple uses of mapcar and apply.
- The Postscript Language:
- Postscript
Rec 1: Basics.
- Postscript
Rec 2: Business Card.
- What you should know:
- The "basics" as listed under items 1 through 11 under
"Basic Topics (from the Blue Book)" in the writeup for the
first Postscript recitation
here.
(There is a lot of material here -- you only need a rough
understanding of all of it.)
- Specifics about the "Overlapping boxes" examples in the
above web page.
- Specifics from the "Practice with translate, rotate, and scale"
examples in the above web page.
- Other material from more complex examples and from your
business card.
- The Prolog Language:
- Prolog Recitation.
- What you should know:
- Specifics about Prolog facts, rules, and queries as
illustrated in the example:
Prolog knowledgebase example.
- Simple uses of Prolog in database management type
examples, as shown on the Prolog recitation:
here.
- Generic constructs in C, C++, and Java:
- Generic Constructs.
- What you should know:
- How C++ uses the template feature to
achieve genericity (just the basic ideas and implications,
without details of the syntax of templates).
- How Java can handle an arbitrary Object
including code to print an object without knowing until
run time just what the object is (accomplished by including
a toString method in the class implementing
the object, if one is not already provided.
- How Java can use the Comparable type,
which is defined by any class that "implements Comparable" by
providing a compareTo method. The examples
showed how to handle any type with a compareTo
method, including String, the "wrapped"
classes Integer and Double
(which already have compareTo defined),
and any user-defined class with a compareTo
method (illustrated with the Rational type
in the example in the recitation).
Revision date: 2003-04-27.
(Please use ISO
8601, the International Standard.)