Question: THIS IS C++ AND ALL CURRENT ANSWERS ON HERE ARE INCORRECT. Implement a generic Map that supports the insert and lookupoperations. The implementation will store
THIS IS C++ AND ALL CURRENT ANSWERS ON HERE ARE INCORRECT.
Implement a generic Map that supports the insert and lookupoperations. The implementation will store a hash table of pairs(key, definition). You will lookup a definition by providing a key.The following snippet provides the Map specification (minus somedetails). You can complete this snippet. After you completed yourmap, use it in a program. Insert 50 (key, definition) which are(words, meaning) from a file that you have already built it. Thenlet the user look up the keys and insert more key and definition.Submit your input file with your code.
template
class Pair
{
HashedObj key;
Object def;
// Appropriate Constructors,etc.
};
template
class Dictionary
{
public:
Dictionary( );
void insert( const HashedObj& key, const Object & definition );
const Object & lookup( constHashedObj & key ) const;
bool isEmpty( ) const;
void makeEmpty( );
private:
HashTable
};
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
