Creating a contacts application, Computer Engineering

Creating a contacts application:

First, a contact is defined as the tuple: firstName, lastName, phoneNumber and email.

You will create a class Contact that allows getting and setting of these variables as well as a toString() method.

Second, a ContactBook class should be able to search, create, or modify a contact.

A main class (call it whatever you want) should offer a menu with options.

When adding, the input from the user is gathered and the method ContactBook.addContact(Contact c) will store that contact in memory.

If the user is searching, the program gets the user input and then calls the method ContactBook.search(String lastName). This method should return an ArrayList with all the contacts that matched the criteria. for example, a call to search("Jon") will return an array list with the contacts for "Jones" and "Jonowsky" and any other contact whose last name starts with "Jon". Your search should ignore cases.

If the user wants to modify a contact, the first thing to ask for is that contact's last name. Then the program will search based on that last name (or portion of it, just like the search functionality) using the search method defined earlier. Then the computer should display them with a number next to them (1,2,3...). Then the computer will prompt the user "Which contact do you want to modify" and will expect a number. Then it should enter into a modify screen that will ask the user to modify the values of last name, first name, phone and email. If users just presses enter, the old values are kept. If the user types in something then a new value will be set. After collecting the input of the user, your program should call a method from ContactBook called updateContact(Contact c, String firstName, String lastName, String phone, String email), where c is the contact to modify.

When the user quits (by pressing "q") or saves (by pressing "s") Your contact list should be saved as a Comma Separated values. That is, each line in the file should contain LastName,firstName,phone,email

When the program starts, if the contacts file is present, it should read it and populate the list of contacts.

The contact file should be called "contacts.csv"

Posted Date: 2/18/2013 4:17:20 AM | Location : United States







Related Discussions:- Creating a contacts application, Assignment Help, Ask Question on Creating a contacts application, Get Answer, Expert's Help, Creating a contacts application Discussions

Write discussion on Creating a contacts application
Your posts are moderated
Related Questions
Q. Explain about Octal Numbers system? An octal system has 8 digits signified as 0,1,2,3,4,5,6,7. For finding equal decimal number of an octal number one has to find quantity o

COM add-ins are software program's which are included into an application and they add already built in features to an existing application. They have general architecture across m

Define the terms : spatial locality and temporal locality. Spatial Locality:  The spatial aspect means that instructions in close proximity to a recently implemented instruct

What is the File-system security Most commercial servers use a powerful operating system as base that provides good methods of file-system security. Some servers require additi

What is Electronic Data Interchange? Electronic Data Interchange (EDI): It is used by organizations for transactions which arise on regular basis to a pre-found format.

Number systems   Consider a decimal number:               7654.32   Short hand for:            7 * 103 + 6*102 + 5* 101 + 4*100 + 3*10 -1  + 2*10 -2   Likewise

applications of context free grammar

What are the disadvantages of FCFS scheduling algorithm as compared to shortest job first (SJF) scheduling? Disadvantages: (i) Waiting time can be huge if short requests w

Name some Popular Internet Browsers There are many internet browers are available on internet. Some Popular Internet Browsers are: Internet Explorer, Netscape Navigato

Illustrate about 8259 8259A adds 8 vectored priority encoded interrupts to the microprocessor. We can expand it to 64 interrupt requests by using one master 8259A and 8 slave