Augustana Faculty logo

COMPUTING SCIENCE 110
Introduction to Computing Science


Lab Assignment 10 -- Programming in Bare Bones



Due Date: Wednesday, December 8 (by midnight)

Objective

Assignment

Write two programs in the Bare Bones programming language, as described in Section 11.3 of Brookshear's Computer Science: An Overview, 8e, and test them using Mike Huffman's BareBones Interpreter (as corrected by J. Mohr).

  1. Write a Bare Bones program that does the equivalent of the following Java code:

       if ( x != 0 )
          y = 1;
       else
          z = 1;
    
  2. Write a Bare Bones program that sets variable z to the minimum of x and y, where x and y have been set to arbitrary non-negative integer values.

    Because the program could produce many lines in the output window and the z might receive its final value in the "middle" of the program execution rather than near the end, please put the following two Bare Bones commands at the end of your program:

       incr z;
       decr z;

    This will ensure that the last value printed in the output window is the final value of variable Z.

Hints

Grading

The first program -- implementing an if statement -- will be worth 4 points, and the second -- determining the minimum of two integers -- will be worth 6 points.

Submission

Submit your programs by copying and pasting them into the text boxes of the form below.

  1. Implementing IF in Bare Bones

  2. Finding the minimum of X and Y

You may submit the form multiple times if you wish to correct errors in previous form submissions or to add information to the form. However, if you resubmit the form, you must re-enter both programs. Your last submission will be accepted for grading.



Change Password

Your assignment submissions are password-protected. These passwords apply only to form data submitted via the Web server for Jonathan Mohr's courses. They are separate from (and typically different from) your network password or the password. To change your Web password, press the following button:

Copyright © 2004 Jonathan Mohr