Question: Consider a map data abstraction that maps string to int. Map allows for existing mapping to be looked up. Maps are also mutable: new pairs
Consider a map data abstraction that maps string to int. Map allows for existing mapping to be looked up. Maps are also mutable: new pairs can be added to the map and an existing mapping can be removed.Give a specification for maps. be sure your data type is adequate and if any operation throws exception explain whether they are checked or unchecked?Also implement your specification. give the rep invariant and abstraction function and implement repOk and tostring. Use Java for implementation
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
