Assignment

Contents:

  • Overview
  • Internet Requirements
  • Practice Problems
  • Problems to be Submitted
  • Extra Credit

  • Overview

    Topic: High-Level Programming
    Related Reading: Ch. 8
    Due:

    Internet Requirements

    You may want an Internet connection for several practice problems. However you do not necessarily need the connection for completing the assignment, other than for submission.

    Practice Problems

  • Exercise 17 of Ch. 8 (p. 267); answer in back of text

  • We have not often explored the publishers web site for the text. Complete the crossword puzzle associated with Chapter 8. (The answers can be revealed through the icon near the bottom-left corner of the puzzle.)

  • Problems to be Submitted (20 points)

    Preface: Several of these problems ask you questions about the behavior of sample pieces of something resembling a high-level language, such as Java. We will use the symbols ">=" to mean "greater than or equal to" and similarly "<=" to mean "less than or equal to."

    The point of these problems is not to worry about the precise syntax of the statements, but instead to recognize the high-level behaviors which were discussed in the lecture and text.

    1. (5 points)
      Tell whether the following Boolean Expressions are true or false.

      1. (6 < 10)

      2. (7 < 7)

      3. (8 >= 8)

      4. ((5 > 3) OR (6 < 2))

      5. (((7 > 3) OR (4 > 6)) AND (6 < 2))

    2. (5 points)
      What value or sequence of values will be printed when running the following segment of code?
         set value of variable 'val' equal to 3;
         while (val < 6) do {
           print current value of 'val'
           add 1 to val
         }
      

    3. (5 points)
      What value or sequence of values will be printed when running the following segment of code?
         set value of variable 'val' equal to 11;
         while (val >= 7) do {
           subtract 1 from val
           print current value of 'val'
         }
      

    4. (5 points)
      At the end of Ch. 8 there are a series of "Thought Questions" (p. 272-273). Choose one of question #1, #2 or #3 to answer. The length of your answer should be appropriate for the question, however I envision answers in the range of 1/2-page to 1-page. You may certainly use the web for research on any of those questions, however you should cite your sources appropriately.
    Overall, please type your answers to all of the problems in a single document to be submitted electronically. Please see details about the submission process.

    Extra Credit (2 points)

    Answer an additional Thought Question from among questions #1, #2 and #3 of Ch. 8.


    Last modified: 12 November 2002