Answered step by step
Verified Expert Solution
Question
1 Approved Answer
/ * * * Your implementation of a ExternalChainingHashMap. * / public class ExternalChainingHashMap { / * * The initial capacity of the ExternalChainingHashMap when
Your implementation of a ExternalChainingHashMap. public class ExternalChainingHashMap The initial capacity of the ExternalChainingHashMap when created with the default constructor. DO NOT MODIFY THIS VARIABLE! public static final int INITIALCAPACITY ; The max load factor of the ExternalChainingHashMap. DO NOT MODIFY THIS VARIABLE! public static final double MAXLOADFACTOR ; Do not add new instance variables or modify existing ones. private ExternalChainingMapEntry table; private int size; Constructs a new ExternalChainingHashMap with an initial capacity of INITIALCAPACITY. public ExternalChainingHashMap DO NOT MODIFY THIS METHOD! table ExternalChainingMapEntry new ExternalChainingMapEntryINITIALCAPACITY; Returns whether or not the key is in the map. @param key The key to search for in the map. You may assume that the key is never null. @return true if the key is contained within the map, false otherwise. public boolean containsKeyK key WRITE YOUR CODE HERE DO NOT MODIFY METHOD HEADER Returns the table of the map. For grading purposes only. You shouldn't need to use this method since you have direct access to the variable. @return The table of the map. public ExternalChainingMapEntry getTable DO NOT MODIFY THIS METHOD! return table; Returns the size of the map. For grading purposes only. You shouldn't need to use this method since you have direct access to the variable. @return The size of the map. public int size DO NOT MODIFY THIS METHOD! return size;
Your implementation of a ExternalChainingHashMap.
public class ExternalChainingHashMap
The initial capacity of the ExternalChainingHashMap when created with the
default constructor.
DO NOT MODIFY THIS VARIABLE!
public static final int INITIALCAPACITY ;
The max load factor of the ExternalChainingHashMap.
DO NOT MODIFY THIS VARIABLE!
public static final double MAXLOADFACTOR ;
Do not add new instance variables or modify existing ones.
private ExternalChainingMapEntry table;
private int size;
Constructs a new ExternalChainingHashMap with an initial capacity of INITIALCAPACITY.
public ExternalChainingHashMap
DO NOT MODIFY THIS METHOD!
table ExternalChainingMapEntry new ExternalChainingMapEntryINITIALCAPACITY;
Returns whether or not the key is in the map.
@param key The key to search for in the map. You may assume that the
key is never null.
@return true if the key is contained within the map, false otherwise.
public boolean containsKeyK key
WRITE YOUR CODE HERE DO NOT MODIFY METHOD HEADER
Returns the table of the map.
For grading purposes only. You shouldn't need to use this method since
you have direct access to the variable.
@return The table of the map.
public ExternalChainingMapEntry getTable
DO NOT MODIFY THIS METHOD!
return table;
Returns the size of the map.
For grading purposes only. You shouldn't need to use this method since
you have direct access to the variable.
@return The size of the map.
public int size
DO NOT MODIFY THIS METHOD!
return size;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started