Can you think of a fast way to look up the name when you are given the phone number?

Add a method getName(String phoneNumber) to the PhoneBook class.


```
/? ?
? Method t o g e t t h e name f o r a phone number
? @param number t h e phone number t o l o o k u p
? @return t h e name i f found e l s e n u l l
?/
public S t r i n g getName ( S t r i n g number )
{
return nameMap . g e t ( number ) ;
}
```

Use another Map to store the phone number as the key and the name as the value. See the PhoneBook class in the bookClassesFinal directory.

Computer Science & Information Technology

You might also like to view...

What is the component of Performance Monitor that records computer performance information into log files?

a. Data Collector Sets b. Reports c. Object d. Alert Monitor

Computer Science & Information Technology

The risk treatment strategy that attempts to reduce the impact of the loss caused by a realized incident, disaster, or attack through effective contingency planning and preparation is known as the mitigation risk treatment strategy. __________

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Change the percent to a decimal.

A.
B.
C.
D.
E.

Computer Science & Information Technology

____ are like transparent sheets of plastic that are stacked on top of each other.

A. Animations B. Timelines C. Playheads D. Layers

Computer Science & Information Technology