Question
Can someone please do this assignment for me please thank you so much in advance. As you discovered in this weeks Discussion, data trees can
Can someone please do this assignment for me please thank you so much in advance.
As you discovered in this weeks Discussion, data trees can be useful for organizing and storing data in many real-life scenarios. In this Assignment, you will practice coding another advanced data structure, a HashMap. You will create your own HashMap application based on a sample code. Be sure to refer to the Learning Resources as you create your HashMap.
Review the resources included in the Explore section.
HashMap is a Map-based collection that is used to store key-value pairs HashMap
HashMap is similar to the Hashtable except that the latter is unsynchronized and permits nulls (null values and null keys).
HashMap is not an ordered collectionit does not return the keys and values in the same order as they have been inserted into HashMap, and it does not sort the stored keys and values. You need to import java.util.HashMap in order to use the HashMap class and its methods.
Before proceeding to coding, review the code samples linked below and see how to create a HashTable and/or a HashMap and use these structures for effective data storage and retrieval. Also review the Iterator class and its use to retrieve data structure content.
Submit the following program:
Explore the HashMapDemo code below and add the required elements specified in the comment lines:
import java.util.*; // clarify this import statement importing only the classes necessary for this particular application public class HashMapDemo { public static void main(String args[]) { HashMap
Save the completed code as HashMapDemo.java. Compile and run your application; debug errors if necessary.
Make your application user friendly and explain to potential users what they see (i.e., an initial countries list, the changes made, the modified list, etc.). Format the output in an orderly fashion for easy reading.
Add the proper Header to HashMapDemo.java file. Do not forget to include the comments for each statement in the .java file to explain what those statements do.
Create a UML class diagram of the application illustrating class hierarchy, collaboration, and the content of each class (include as a part of the MS .doc documentation below).
In the MS Word document, include your answers on the questions:
What are the differences between HashTable and HashMap classes?
Could one rather than the other have advantages to be implemented in Java applications?
What difference could be made for the HashMapDemo application if you were to utilize the HashTable class?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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