Reading Exercise #1
Due 4:00 PM, Tuesday Jan. 14, 2014
The purpose of reading exercises
Reading exercises serve several purposes
- They ensure that students have read the assigned material
before class. The instructor does not have the time to cover all the topics
in the reading. Instead he wishes to use class time to discuss important
issues more deeply. If students have not done the reading they cannot
participate meaningfully in the discussions, and class time is wasted.
- The reading exercises serve as a guide to what is in the reading. Thus the
student may better appreciate the reading.
- Answering the reading exercise questions forces the student to think
about the meaning of what is read.
How to complete a reading exercise
- Read through the exercise first, to get an idea of what you are supposed
to get out of the reading. If you know what you are looking for, you'll get more out of the reading.
- Then read through the text, take notes when you come to a section that might
help you answer a question.
- When you have finished the whole reading go back and fill in the answers.
How to turn in a reading exercise
To turn in an exercise, repeat each question along with your answers. You might do this
by cutting and pasting from the exercise, or by printing it out, and writing your
answers on the printout, and then scanning your result into a PDF that you
can submit via the drop box function of D2L. Submit only *.txt or *.pdf or *.html
documents to D2L. It is your responsibility that exercises are in the correct formats.
Content of reading exercise #1
- Compare and contrast the information contained in precedence and associativity rules
with the information contained in order of evaluation rules for expressions.
- Compare and contrast iteration and logically controlled loops.
- List the control flow mechanisms. Some control flow mechanisms are
used predominately in Imperative, Functional, and Logic languages. For each
type of language list the control flow mechanisms most commonly associated
with that type of language.
- What are the differences between a value-model of variables and a reference model of variables?
- Why do many languages leave the order of evaluation of the arguments to functions unspecified?
- Describe 3 different search strategies that might be used to implement a
case statement. Describe the circumstances where each would be desirable.
- What is tail recursion? Why is it important?
- How does lazy evaluation differ from normal order evaluation?
- Why is initialization of variables important? In some languages it is
either hard (or expensive) to tell if a variable has been initialized when
it is used. Why?