CMSC 10600 Fundamentals of Computer Programming 2
Winter 2002 --- N. Russo and S. Salveter

Homework 8 -- Details

Due Wednesday 06 March 2002

This week all of the problems come from the text.

Turn in your program in the usual way, as described in Instructions for Handing in Assignments.

  1. Text page 878 #2

    Keep your classes and main function in one file. Turn in a copy of your code including steps a. through c. Turn in the output from before and after you made the change mentioned in step d. With the output, include a paragraph explaining the output.

  2. Text page 910 #2

    When we first started using collections of variables, c-style arrays were the only structure we could use. We always had to specify the length of the array in our code, which meant we had to know at compile-time how many items we needed to store. Then we learned about "dynamic" arrays, whose sizes can be specified at run-time. Even then, we needed to ask the user how many items they would be entering. Now, we can use STL lists and we don't have to specify the size of the collection at all! We can increase or decrease the size of the list as much as we want at run-time.

    After the user enters the corresponding numerical month/day, print out the alphabetic month/day, but also enter it into an STL list. At the end of your main function, sort the list and print it out in its entirety.

    For information on STL, check out http://www.msoe.edu/eecs/ce/courseinfo/stl/