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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started