Read Books (books)
CS 362 - Spring 2011 - Ms. Katz

Due: 11pm, Thursday, March 31st     Worth: 25 points

Goals
- to build a program quickly with available tools
- to use the STL set class as well as iterators

Problem Overview
This program reads a list of people and books they've read and prints a list of the people and a list of the books.

Problem Specification
Write a C++ program to solve this problem.

You must use the set class from the Standard Template Library. Using sets will store the information in the two lists alphabetically so that they can be accessed efficiently.

The input is many lines each containing a person's name (no spaces) and the title of a book (no spaces). You may assume the input is good and always contains exactly two strings.

The output lists the names of all the people mentioned. It then lists the names of all the books that were mentioned. Each list should have a label. Each list should be sorted in increasing alphabetical order. A book or person should be on the list one-time only; there should be no duplicates.

You must use functions, pass parameters appropriately, and include comments in your code.

There should be only one printing function. It should use an iterator.

Build this program in one file with a name ending in .cpp. Submit it as the books assignment.

Sample Input
Helen Contact
Beth Foundation
Beth Contact
Mark Filmmaking
  Output given Sample Input
People: Beth Helen Mark
Books: Contact Filmmaking Foundation