Phone Book Entries - JAVA

profilemulung
lab6_requirements.pdf

Copyright © 2014 John Bono, Ph.D. All rights reserved.

1

Lab 6 Goal: The purpose of this lab is to demonstrate an understanding of working with Strings, while reviewing most of the concepts completed in the first half of the course. Problem: You are working at the phone company, AIT&T. You have been asked to create an application that helps people find other people from a phone book. People can be added to the phone book in one of two ways:

 They are automatically added based on pre-identified information from a file feed received from the Association of International Telemarketers

 They are manually added based on user entry Create an object-oriented solution that performs the following tasks:

 Allows for the entry into the phone book using pre-identified information or user input information

o Names must be validated so the user does not input blank spaces for the name o Phone numbers must be validated to fit the format: XXX-XXX-XXXX

 Prints a display of all entries in the phone book

 Allows searching entries in the phone book based on name. At this time, the search only supports retrieval of one name, the first matching name. When an entry is found, the entry is printed out. When an entry is not found, an error message is printed out.

When creating your implementation class, use the following for the main method. No code changes are necessary to this main method:

Copyright © 2014 John Bono, Ph.D. All rights reserved.

2

Note: Remember the good design principles you have already learned in the course, such as when to use static variables/methods and information hiding.

The example run below shows how the program would run. Pay careful attention to the sample run and try to have your program run exactly the same.

Copyright © 2014 John Bono, Ph.D. All rights reserved.

3

Copyright © 2014 John Bono, Ph.D. All rights reserved.

4

Copyright © 2014 John Bono, Ph.D. All rights reserved.

5