Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

Hi, I need help adding a map class.

Hi, I need help adding a map class. <br/><br/><br/><br/><br/>Use the

JDK Map class to write more efficient code when constructing the internal data structures from the data file.

The instances of the hash map class should be local to the readFile (Scanner) method.
2. These instances should be passed as explicit parameters to other methods used when reading the data file.
1. For example, the body of the methods like the following should be replaced to effectively use a &lt;Integer, Ship&gt; hash map, the surrounding code needs to support this structure: Ship getShipByIndex (int x, java.util.HashMap &lt;Integer, Ship&gt; hms) { return hms.get(x); } // end getDockByIndex
2. Since the body of this method has become trivial, perhaps the call to this method can be simply replaced by the get method of the HashMap.

 Archive.zip – Preview not available

Sign 

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"