Here is my code. i have to creat a phone book in whcih you can add entries. find them. list all entries. and quit. the entries are to be put in an array as a class. Please tell me whats wrong with it and how i can search for a name and then pull the number and notes that go with that name and return it to the user. please and thank you! The code compiles fine but when i try to excecute the find option it errors. also i dont know how i would go about listing all the entries in the phone book. and im not even sure if they way i did the add an entry part works properly. it seems to when excecuting it in the program but i dont know if it actually stores it in the array or not.

Can you explain what the problem with the program is? Does it compile ok? What happens when you execute it?
If it needs code for some feature, describe what the steps the program should take to get the feature to work.

the main problem i have right now is that i need to user to be able to put in the name part of a name number and notes entry, and have it return the number and notes that go with it. basicly like a search. this is done when the user gives the f command when asked to select an option. which is the part with the while loop.

April 15th, 2012, 06:49 PM

Norm

Re: Java phone book with array PLEASE HELP

Quote:

main problem i have right now is that i need to user to be able to put in the name part of a name number and notes entry, and have it return the number and notes that go with it

Can you be more specific on the problem?
Which part is the problem:
Read the name
find the name
return some data

One problem: I don't see where you put Entry objects into the array hold the Entry objects: entryList

The entryList array should not be in the Entry class.

April 15th, 2012, 06:51 PM

cardschaos

Re: Java phone book with array PLEASE HELP

i can read the name the user inputs, its the taking the inputed name and finding it in the array and then the reaturning the data in a system.out.print form that i dont get how to do