Computer problems,Computer help
*AX SOFT>>>Programming & Design

Phonebook program??


im not looking for someone to do the program for me, but i would like a starting point and maybe some tips. im doing the program in java. the program will allow the user to insert a persons phone number and name, or search for either the name or phone number of a certain person. any hints will be appreciated. thank you.

Ok, if u do not want to talk about databases, then keep reading.
Write a class named "PhoneBook", this class should contain at least the following instance variables:
1- Name (person's name).
2- Home_phone_number.
3- Office_phone_number.
4- Cellular_phone_number.
5- E-mail_address.
6- Street_adress.

U may have this question in ur head: "What if he has more than one of those variables, for example what if he has more than one e-mail address??", in that case, if u want to enable users to enter more than one thing in each entry, then these variables should be arrays, not normal variables, for example an array that stores all the e-mail addresses.

The class should contain the following functions:
1- Print (prints each person's details: phones, e-mails, addresses, ... etc)

2- Search for people (records) by name, e-mail, phone numbers, ... etc.

3- Delete a record, which requires searching first for the record to be deleted.

In application, u should store all records that have been created in a list or an array of type PhoneBook, the reason for this is that u r going to search for records, arrays and lists are easy to search, for example:
PhoneBook book1[ ] = new PhoneBook[10];
for(int c=0;c<10;c++)
{
book1[c]=new PhoneBook( // put the parameters of the constructor here);
}
Then write a search method for searching for names, addressesm ,,,,etc., then apply it:
search([]book1, "Zakari");

Thats a part of what i thought about, there are too much details to mention here.

Good luck
Bye

Tags
  General - Computers & Internet   Software   Security   Programming & Design   Facebook   Flickr   Google   MSN   MySpace
Related information
  • Graphic Designer raise?

    the economy is in a toilet right now. so I'd say the raise wasn't even 3% (did i check the math right?) anyway... your lucky you even got a raise. many companies are forced to say - i...

  • How do you delete a page from your Piczo Account?

    1]Go to "My Site" 2] Click on the "Organize" tab at the top 3] In the "Named Pages" section you will see all your pages. 4] Click on "Organizer"next to th...

  • What's the next killer app?

    Safe security area accessible from the net where I can store links with username/password. I hate having to remember all the usernames, links, passwords. I just want to go to a webpage and have my ...

  • Were can i get java script is it free?

    If you mean "javascript," then YES it is free! It comes as part of your web browser! All you need is a basic text editor and some knowledge of HTML to learn javascript... If you mean &...

  • How do you start a Website and make money from the links?

    To start a website you need to sign up for hosting. I recommend anybody with site builder. Beginners use site builder, everybody else uses html. If you learn html then you can make much better webs...

  • Using the dreaded goto command?

    Of course it would be worse... when you call a function, the code has to save the state of the previous functions in the registers, set up stack frames... all of which would be avoided if you used ...

  • Simple database (SQL) question?

    Well, it really depends on what language the web page is coded in, but if it is a Microsoft technology, I might suggest using the ADO library of tools. Here is a great link to some info about it : ...

  • PHP: how to get the upper bound of an array?

    You mean how many elements there are in the array? count($array) should do it.

    ...
  •  

    Categories--Copyright/IP Policy--Contact Webmaster