Question
In Java-- Please ensure all classes are complete and instructions are followed completly. Please ensure that all code is commented extensively Using the map ADT
In Java--
Please ensure all classes are complete and instructions are followed completly. Please ensure that all code is commented extensively
Using the map ADT
A map is a data structure that provides a collection containing unique keys associated with a single value.
Operations:
Create empty map
Find key in map
Find value of a given key, if key exists
Insert a key with its associated value, if key does not already exist
Remove a key and its associated value
Implement map ADT in file called mapYourLastName.java, to map email addresses (key) to people's names (value). Both can be Strings.
Your driver class should add at least 3 people, search for 2 people by key (email addresses) and remove all keys when done.
Note from discussion board:
Just like Queue, you made a constructor and methods, here you define a class Map, decide how you are storing key, value pairs (in trees and lists we used nodes, queues we used an array)
Then have a Map() constructor, a method returning a boolean called findKey, a method returning the value of a given key getValue(key) if the key exists, ...
Then you will make a MapTester file, you will write your own here.
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