The method mapNums returns a HashMap that stores values of how many times a given key digit has appeared in an input String. Write a...
Search Results
Searching for: Map
Individual Exercises
Octavia has given you a list of movies. She is tired of deciding what to watch by name and now wants to be able to pick them by the...
You are in charge of keeping student records. Those records are recorded in a hash map that uses a student's ID number as the key in...
Complete the hashing algorithm for a hash table so that it functions using open addressing. Remember to store both keys and values in...
A teacher is creating an answer key to a true/false quiz. They need a map that can store an integer question number and the corresponding...
Create a Map that can store Integer
ID numbers that will map to String
name values. Create a Map
object that can store such data. You...
For this question, you can assume you have access to a class called Pet
that stores all of the data that applies to a specific pet (name,...
A teacher is creating an answer key to a true/false quiz. They need a map that can store an integer question number and the corresponding...
The soccer team is using a Map
to track which students have or haven't submitted their medical records. The map is using team member's...
Complet this method to Add the numbers 0-9 as keys to the map. If the key is even, the value for that pair should be true
. If the key is...
The following Map
should have 7 entries, with a string key for every day of the week. Each value should be a double that represents the...
Write a method that takes a key and an associated value as parameters, and will only add them as anew entry in the map if the key is not...
Due to a coding problem at the phone company, Jane M's name keeps getting added to the no call list when she should not be there. Write a...
The phone company is having trouble where bad phone numbers keep appearing under different names. Write a method that will return true
if...
The method below takes in a map of integer key/value pairs. Create a new map and add each key from the original map into the new map,...
The method below takes in a set of String names of students. Below, use this set names
to create a map (either HashMap or TreeMap is...
A teacher is tracking grades for two sections of a class using two maps. Each map uses the student's name as a key with their grade is...
In the previous exercise, you took two maps and turned them into one larger map. Now the teacher wants to take that larger map and create...