CIS 11: Data Structures and Algorithms

Project C

Complete Project 2e from Chapter 4 of the text. Directions are on page 209.

typedef double value_type;
keyed_bag2();
keyed_bag2(const keyed_bag2& source);
~keyed_bag2();
keyed_bag2& operator =(const keyed_bag2& source);
void insert(const value_type& entry, int key);
bool erase(int key);
value_type get(int key) const;
size_type size() const;
size_type count(const value_type& target) const;
bool has_key(int key) const;

When you're satisfied with the definition and implementation, submit your work via the CATE form for Project C.

Legend: method/function keyword literal

2007/02/23