Map & HashMap
In this assignment, you will implement a generic map interface in two ways:
- as a hash table
- with another map implementation from the activity (attached)
If you prefer, you may implement and test maps of Strings (sample code in the right column below).
You should use normal Java arrays for storage, not ArrayList or other classes from the Java Collections API.
Your submission should be a zip file that includes the following files:
- IMap.java (below, no changes needed)
- IMapTest.java, HashMapTest.java, and OtherMapTest.java (below, no changes needed)
- use the first column for Generic version, second column for String version
- HashMap.java (your hash table implementation) (Here is the main task)
- OtherMap.java (your other implementation) (Here is the main task)
Sample Code for Generics | Sample Code for Strings (not Generic) |
interface IMap<T> { | interface IMap { |
import static org.junit.Assert.*; | import static org.junit.Assert.*; |
import static org.junit.Assert.*; | import static org.junit.Assert.*; |
import static org.junit.Assert.*; | import static org.junit.Assert.*; |
10 years ago
8
Answer(0)
Bids(0)
other Questions(10)
- The duration of a 5 year zero-coupon bond is: a)smaller than 5 b)larger than 5 c)equal to 5 d)equal to that of a 5 year 10% coupon bond e)none of the options
- dq
- 2DB Performance Management and Employee Services
- Math1
- tutor james
- ECONOMICS MACRO.
- Nutrition
- QNT 561 Week 6 Team Assignment ( Business Research Project Part 5 Research Report And Presentation ) ~ Perfect Tutorial With References (Scored 100%)
- Understanding the Hierarchy of Managerial Levels and Division of Labor (Phyllis Young)
- ENGlish