



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An overview of Maps as an Abstract Data Type (ADT) in Java, explaining their structure as key-value pairs, the use of interfaces for implementation, and examples of hashmaps and BSTmaps. It also includes Java code snippets for putting, getting, and removing values from a map.
Typology: Study notes
1 / 6
This page cannot be seen from the preview
Don't miss anything!




Structured Programming 1110/1140/ The Map ADT A Map interface and its implementation ADT Recap
Structured Programming 1110/1140/
First-principles implementation of three Java container types:
Structured Programming 1110/1140/
We will explore maps using a simple interface: public interface Map<K,V> { V put(K key, V value); V get(K key); V remove (K key); int size(); }
Structured Programming 1110/1140/ fruit
orange apple banana pear apricot peach mango plum grape cherry a-f g-m n-t u-z 3.50 2.50 5.50 12. 11.25 7. 4.00 4.00 6.00 4. fruit.getfruit.putfruit.put(“apricot”)(“grape”, 7.00)(“orange”, 3.50)
apricotorangegrape