Starting from:

$29.99

Lab 11 - Map

Lab 11 - Map
Direction: Submit typed work in the Labs directory of your github repositor or dropbox, or upload to the google classroom
assignment. Modify the template file provided named ''lab11.h'' and submit your modification. Including any additional
libraries will result in a 0.
Part A: In class
Your objective is to write the definition of the inherited methods from the MapInterface interface in the body of the
Map class as follows
 Put() - if key is not a member of the map and the size of the map is less than 100, it adds the key-value pair
(key,value) to the map; otherwise, it does nothing.
 Get() - if key is a member of the map, it returns the value that is mapped to key from the map; otherwise, it
throws an error message.
 Contains() - it returns true if the key is a member of the map; otherwise, it returns false.
 Remove() - if key is a member of the map, it removes that key-value pair from the map; otherwise, it does nothing.
 ToString() - it returns a string of all the key-value pairs of the map in point format (i.e in parentheses separated
by a comma; (key,value)) enclosed in curly braces each separated by a comma.

More products