Lecture 7 – September 19th
Almost everyone was able to get one of the sorts working and submitted to drop box
Today we talked about stacks
We wrote stack.ads (a specification for a stack package) and modified it as stack2.ads
We partially wrote stack.adb (as the implementation for the stack package) and modified it as stack2.adb
For homework:
complete stack2.ads by adding comments including your name – save it as yournameStack.ads
complete stack2.adb by adding comments including your name, pre-conditions and post-conditions – save it as yournameStack.adb (
(mine would be saved as either
AdamsStack.ads and AdamsStack.adb OR as
LizStack.ads and LizStack.adb)
Be sure both the specification and the body compile.
Write a procedure that tests your package. The procedure should have this heading and should have a description of the test suite and expected output as comments. Compile and run the procedure. Name the procedure yourname8.adb (mine would be adams8.adb or liz8.adb)
You may put the files in the drop
box but I will also want you to submit them as an ASSIGNMENT and will post
directions on how to do this later today.
Here are the notes which
Shawn has provided for you