Let's get more practice with maps!
Create a class called
You should provide two methods:
add, which takes an
Objectand does not return a value
get, which takes an
Objectand which returns an
get should return the number of times that
add has been called for that
Object on that
For example, which your class is done it should work like this:
We suggest that you use a
Map internally to track the number of times you have seen a particular Object value.