CSE 111, Fall 2000

HW #7: CODING DECISION TREES

Last Update: 18 October 2000

Note: NEW information is marked.

  1. Implement, compile, and test NEW the Pascal program that you wrote for decision-tree problem #6 from the midterm exam; type it in exactly as you had it on the exam. Note that you will need your exam to do this problem, so please see me or come to lecture to get your exam back if you have not already done so!! NEW

                                               ----------
                                               | Great! |
                                              /----------
                                         yes /
                                            /
                            ---------------/
                            | Could you   |
                           /| compile it? |
                      yes / ---------------\
                         /                  \
    --------------------/                 no \
    | Can you write    |                      \--------------
    | a Karel program? |                       | Try again! |
    --------------------\                      --------------
                         \
                       no \
                           \-----------------
                            | Take CSE 111! |
                            -----------------
    

  2. Then do one of the following:

    • IF your program does not compile or does not run properly,
      THEN write a bug report that includes the compiler error messages (if any) or the failed run (if it compiled but did not run correctly), and that includes a journal of your attempts to fix the bug(s), including any new compiler error messages or new runs of the program.

      IF you cannot fix your program at all,
      THEN try to describe what you think the problem is.

      OR:

    • IF your program works on the first try,
      THEN:
      • extend the decision tree so that instead of printing "Take CSE 111!" on the first "no" branch, it offers the user another binary choice
      • write, compile, and test a Pascal program that codes this extended decision tree
      • IF necessary,
        THEN write a bug report as specified above.
NEW Turn in the following, stapled in the upper left corner:
DUE: AT THE START OF LECTURE: WED., OCT. 25



Copyright © 2000 by William J. Rapaport (rapaport@cse.buffalo.edu)
file: 111F00/hw7.18oc00.html