Help me in my first project
posted 12 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
i am required to implement a program to represent a phonebook. The program is required to handle all the common features of phonebooks such as insertion, deletion, editing and searching.
The program should handle all the following operations
1- Add a new contact
2- Edit an existing contact
3- Delete an existing contact
4- View all existing contacts
5- Search for contacts by First Name, Last Name or Phone Number.
6- Save and Load contacts to and from files. The file format is like the following and you must commit to this format.
i've implemented all of above except finally point i want you explain the concept of writing in files and this what i have done until now
The program should handle all the following operations
1- Add a new contact
2- Edit an existing contact
3- Delete an existing contact
4- View all existing contacts
5- Search for contacts by First Name, Last Name or Phone Number.
6- Save and Load contacts to and from files. The file format is like the following and you must commit to this format.
i've implemented all of above except finally point i want you explain the concept of writing in files and this what i have done until now
posted 12 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Please UseCodeTags (<- click) when posting your code. That way you will make your code a lot of easier to read and thus increase chances of getting a good answer. I have added them for you this time.
The quieter you are, the more you are able to hear.
posted 12 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
As for the last part of your task you'll need to show what you have done so far. If you have never implemented reading/writing from/to file, I would suggest you search the official Java tutorial on this topic.
I will take the liberty and comment the rest of your code. It seems ok in some aspects, but do you really want to use first name as an identifier for editing/deleting contact? What if you have two contacts with the same first name, which one will be deleted with your code?
I would also suggest you add toString() method to your Contact class that you could then invoke whenever you want to print information about a contact (which might be useful in viewAllContacts() method).
That search() method also seems a bit strange to me.
You should write a class with a main method, and play with your implementation a little. Also, I must say I don't like seeing no comment(s) in your code...
I will take the liberty and comment the rest of your code. It seems ok in some aspects, but do you really want to use first name as an identifier for editing/deleting contact? What if you have two contacts with the same first name, which one will be deleted with your code?
I would also suggest you add toString() method to your Contact class that you could then invoke whenever you want to print information about a contact (which might be useful in viewAllContacts() method).
That search() method also seems a bit strange to me.
You should write a class with a main method, and play with your implementation a little. Also, I must say I don't like seeing no comment(s) in your code...
The quieter you are, the more you are able to hear.
diaa baraka
Greenhorn
Posts: 12
posted 12 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
thanks lot for your advices
| Cob is sand, clay and sometimes straw. This tiny ad is made of cob: The new gardening playing cards kickstarter is now live! https://www.kickstarter.com/projects/paulwheaton/garden-cards |








