A dictionary stores key–value pairs: each key identifies a value for retrieval. In C++, the STL map requires one key type and one value type, with keys sorted internally. section 2.3.4 section 11.1.2
A dictionary design can provide:
- One reusable collection for book attributes instead of separate subclasses. section 2.3.4
Book attributes
An attribute dictionary can represent {KIND: fiction, TITLE: 'Carrie', LAST: 'King', FIRST: 'Stephen', YEAR: 1974, GENRE: horror}. Searching for KIND = fiction, LAST = KING, and GENRE = horror finds matching books.









































