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

What will be an ideal response?


```
/**
* Method to g e t the name f o r a phone number
* @param number the phone number to lookup
* @return the name i f found e l s e n u l l
*/
public String getName ( String number )
{
return nameMap . ge t ( number ) ;
```

Computer Science & Information Technology

You might also like to view...

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

1. True/False: The following statement: Declare Array1[23] allocates storage space for 22 elements. 2. True/False: The following statement: Declare ArrayX[5,5] allocates storage space for 25 elements. 3. True/False: The third element of an array named Dogs is identified by Dogs[3].

Computer Science & Information Technology

Suppose you enter 34.3, the ENTER key, 57.8, the ENTER key. Analyze the following code.

``` 1 Scanner input = new Scanner(System.in); 2 double v1 = input.nextDouble(); 3 double v2 = input.nextDouble(); 4 String line = input.nextLine(); ``` a. After line 2 is executed, v1 is 34.3. b. After line 3 is executed, v2 is 57.8. c. After line 4 is executed, line contains an empty string. d. After line 4 is executed, line is null. e. After line 4 is executed, line contains character "\n".

Computer Science & Information Technology

Which of the following kind of checks is a validity check on data,  which determines whether a number is within a specified group of numbers?

A. group B. numeric C. range D. integer

Computer Science & Information Technology

Each of the following is an example of an intellectual property category EXCEPT ________

A) court orders B) patents C) trademarks D) service marks

Computer Science & Information Technology