0
Liskov's exercises
Specify a map class, named StringIntMap, which maps strings to integers. Maps allow an existing mapping to be looked up. Maps are also mutable: new pairs can be added to a map, and an existing mapping can be removed. Be sure that your data type is adequate. I have a exercises like that but i don't know what it want to tell me, i don't know what i must to do. Can somebody explain it for me? plsssss Thank you so much
3 Respostas
+ 3
I think the exercise telling you to:
1. Create a custom class named StringIntMap.
2. The class serves as a collection of key-value pairs, where string is the key, and integer is the value.
3. Add a search method to seek for an item in the collection class, using a string input as the search term.
4. Add methods to add and remove item(s) from the collection.
That's how I see it, hope it helps a bit; and good luck with the exercise implementation 👍
+ 2
You're welcome Ha Nguyen , I'm glad if it helps, best of luck with the exercise 👍
+ 1
Ipang thank you it help me so much