Name the five steps to top-down
problem solving as described in the text. 
Describe the five program structure/flow
abstractions in the text. 
- Fill in the blank :
- "Computers are t________s, and computing scientists are t___________s."
- The ___________________ function is used to determine
how many LOCs are used to store an item in memory.
- A procedure that returns a value is called a _______________ procedure.
- Express 4AH in decimal: _________, octal: ____________, and
- Before using the value of a variable for the first time in a program,
we need to ________________________ and ___________________________ it.
- The four loop structures in Modula-2 are
_____________________, and _____________________.
- A new type made from a sequence of consecutive values of an
existing type is called a _______________________ of the host type.
- A procedure that invokes itself is called a
- The function that evaluates natural logarithms on real numbers is found
in the ________________________ standard library.
- True or False (circle one): The word FUNCTION is a legal identifier.
- 4GB = _______________ kilobit. (You may express it as a power of 2.)
In the space provided, evaluate each of the following four Boolean
expressions, or if they give an error, indicate why. 
- 'X' >= 'A' AND 'X' <= 'Z'
- (5 / 12 = 2) OR NOT FALSE AND FALSE
- (6 REM 4 > 2) AND (2 REM 0 = 2)
Name the 3 standard I/O libraries used to
open/close files, and the differences among them.
Name at least two procedures from each library. 
What is wrong with this loop, intended to count down from 100 by threes?
How would you fix it?
You may fix the code directly in the space below. 
counter : INTEGER;
counter := 100;
DEC (counter, 3);
UNTIL counter = 0;
Rewrite the following FOR loop code snippet as a general LOOP.
Don't worry about the rest of the module (IMPORT, VAR, etc.). 
FOR idx := 0 TO LENGTH (name) DO
WriteCard (ORD (name [idx]));
Tell me everything you know about Modula-2 records. 
In your own words, describe what inheritance means in object-oriented
Write a complete declaration for each of the following data types:
- A string type:
- A type defining three exceptions,
goodEx, badEx, and uglyEx:
- A type for only the lowercase letters:
- A type for an m by n matrix of booleans:
- A doubly-linked (bidirectional) list of reals:
Draw a diagram illustrating a doubly-linked (bidirectional) list
with three nodes. Include all relevant pointers and indicate
if any are NIL. 
On a separate paper,
write a Modula-2 procedure to delete a node from a doubly-linked
list. A complete module is not necessary. You may assume any necessary
IMPORTs have been done. You may assume type declarations given above.
Pseudocode/design is not necessary to show, but is good for partial credit.
You may assume the user won't ask to delete the first or last node
(you can ignore the tricky special cases at the end-conditions)
Fill in the following grid with moves for a knight's tour.
The first two positions are filled in for you.
You may want to do your scratch work separately
and copy just your final solution here.
Partial credit for showing backtracking work.
Consider the following binary search tree :
- Which node is the root?
- What is the depth of the tree?
- Name all the leaves in this tree:
- Do a post-order traversal of this binary tree.
- Using the algorithm discussed in class, insert a node,
"Cortland", into this BST and diagram the result.
- From the original BST, delete the node, "Gala", using the
algorithm discussed in class, and diagram the result.