Transitions Project 3: Using the STL
Due: Friday March 5th at 11:59pmA
Second pointer manipulation and memory management lab will be given out
at that time since as we saw in class, lots of you had trouble with
In this project you are going to use the STL for the same task you did last time to see what improvement you gain.
You will once again have a data storage class.
This time it need only contain 2 instance variables:
You will once again have to have your text based menu (from the main
function). This time only offer the user 3 options (repeated till the
- A string Name
- An int Grade
(notice that you can reuse much of what you did last time)
- Add new Data
- remove existing data (this would be as trivial as sort if we had operator overloading under our belts already, we don't so lets skip it this time)
- Print out the list
For data Storage use either the STL list or the STL vector
When the data is printed it should be sorted. There is no requirement that it be sorted before that.
Use the STL sort algorithm
to do the sorting. Note that you have to create a comparator function
for your data storage class. Make it sort based on the lexographic
ordering of the Name instance variable in your data storage class.
(we'll talk briefly about compartors in class using the example from
Make sure to include a readme.txt as before.
It should include
- Your name
- your description on how you implemented the lab
- your compile/link commands (whatever I need to do to make your project.)
- Anything that is left undone.
zip up your folder with all code and the readme as before