CIS-2730 Homework #2: Unconstrained Buffers

Due: Wednesday, January 28, 2015

  1. Continue reading Chapter 2 in the text. Pay special attention to the section on arrays (Section 2.3.5 starting on page 47).

  2. Prepare a branch for this assignment in the cis-2730 repository. Here are the necessary commands again for easy reference.

            $ git status            # See what branch you're on and if you have uncommited changes. 
            $ git commit -a -m "message..." # Only if you need to commit outstanding changes.
            $ git checkout master   # Be sure you are on the master branch.
            $ git pull              # Get any updates.
            $ git branch hw02       # Create a branch for this homework.
            $ git checkout hw02     # Switch to the new branch.
          
  3. For this assignment you'll be working with the package Unconstrained_Buffers in the Samples folder. The specification is already complete. Your assignment is to implement the bodies of procedures Fill, Rotate_Right, and Rotate_Left. However, before starting work on these procedures, compile the samples_test program by selecting "Build... Project... samples_test.adb" from GPS's menus. Try running the test program and observe that the tests for the three procedures above fail.

  4. Implement the three procedures above so their tests pass.

  5. When you are done with your work don't forget to commit it to your branch:

              $ git commit -a -m "Some suitable message"
          

Submit your modified version of unconstrained_buffers.adb to Moodle.


Last Revised: 2015-01-20
© Copyright 2015 by Peter C. Chapin <PChapin@vtc.vsc.edu>