CIS-2730 Homework #4: More Practice with Arrays

Due: Wednesday, February 11, 2015

  1. Continue reading Chapter 2 in the text.

  2. Prepare a branch for this assignment in the cis-2730 repository. See the Homework #3 page for the specific commands if you don't remember them.

  3. This assignment builds on Homework #2. You will find the package Unconstrained_Buffers has been renamed to just Buffers. There are six more unimplemented subprograms in that package. I will implemented Count_Character and Copy_Into in class. For this assignment you are to implement the other four subprograms.

  4. I have enhanced the test program to contain (some) tests for the six missing subprograms. You can have some confidence that your work is correct if the test cases all pass. Be aware that if you have problems it is possible the test cases are wrong (this actually happens about 50% of the time when tests fail). Let me know if you suspect any issues with the tests. I invite you to add additional test cases if you want; some of the tests are quite limited.

  5. Although not required for this assignment I invite you to also use the SPARK tools to try and prove your code free of runtime errors. To do this remove the SPARK_Mode => Off aspect from the bodies of the subprograms you want to prove. Use the "SPARK... Prove File" option on the main menu.

  6. 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 buffers.adb to Moodle.

Last Revised: 2015-02-02
© Copyright 2015 by Peter C. Chapin <>