Also known as map or table, is an abstract data type (ADT)
Relies on key, value pair
Inserting a duplicate key into dictionary:
Member functions:
template<class KeyType, class ValueType>
class DictionaryInterface {
public:
virtual bool isEmpty() const = 0;
virtual int getNumberOfEntries() const = 0;
virtual add(const KeyType & searchKey, ) ;
}
template<class KeyType, class ValueType>
class Entry {
private:
protected:
void setKey(
public:
Entry();
Entry(KeyType
bool isEmpty(
ValueType getItem(
void setKey(
void add(
void remove(
}
class ArrayDictionary : public DictionaryInterface<KeyType, ValueType>
{
private:
static const int DEFAULT_CAPACITY = 21;
Entry<
int itemCount (
findEntryIndex(
void destroyDictionary(
public:
bool isEmpty(
int getNumberOfEntries(
bool add(
bool remove(
void clear(
}
#include "DictionaryInterface.h"
#include ""