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. Define Point-to-point Communication? The simplest form of message is a point to point communication. A message is sent from the transmitting processor to a receiving process

Evolutionary approaches boil down - artificial intelligence: In fact as we will see whether evolutionary approaches boil down to like (i) just to identify how to represent pos

What are the risks by merchant's perspective in Electronic Payment Systems? Through merchant's perspective: • Copied or Forged payment instruments • Insufficient funds in

Discuss in brief the history of E-Commerce. History of E-commerce illustrated below: E-commerce began before personal computers were prevalent and has grown into a multibill

What are the restrictions on Subscreens? Subscreens have various restrictions.  They cannot: Set their own GUI status Have a named OK code Call another screen

Q. What is a good resolution? In fact it relies on your hardware. Hence it's the maximum your hardware can allow you.  But one odd-looking resolution that has become popular is

Given: • A sequence of n arrival times t0, t1, ..., tn-1, • a library of mlogically equivalent gates {(d0, c0), (d1, c1), ..., (dm-1,cm-1)} where d is delay and c is cost • a

How to enter from command mode to insertion mode using Vi Editor? Ans) There are various commands that put the VI editor into insert mode. The most usually used commands to get

In this part you are required to review and critique a website of a café or a restaurant of your choice. Your report should be a minimum 500 words with a maximum of 1000 words. You

How do active web pages work? Describe with a small example. Active Web Pages: An active document is not completely specified through the server. Instead an active documen