Note: I will be out of town this week. This quiz is to be done
in class as a group. A designee should sumbit the final answers to me
by email. See the email message I sent to each student.
From the hierarchy of concepts we have developed so far (see concept hierarchy), under what concepts would Associative
Container appear?
An associative container requires a specific operation be
provided for keys. What is that operation?
A sorted associative container requires an additional operation
be provided for keys. What is it?
What is a container operation for which sets are particularly
well suited?
Read carefully the definition of a stack.
What is wrong with the following code:
Think of some real life examples of things that operate as a stack, as
a queue, and as a priority queue. Your examples do not have to be
related to computers, but they can be. You should have several
examples of each.
What is the difference between a priority queue and a
set in STL?
Write program that reads in a bunch of names (strings) and id numbers
(also strings). When the names and ids are all read in (use a special
input string to indicate the end of names), the program
will propmpt for id numbers and print out the associated name. Decide
the best container to use to store the names and ids and use it in the program.