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
How will you fine-tune a class? It is useful to fine-tune classes before writing code in order to examine development or to improve performance. The purpose of execution is to

CIH, also known  as Chernobyl or Spacefiller, is a Microsoft Windows computer virus which first emerged in 1998. It is one of the most damaging viruses, overwriting critical inform

I have developed a web application in .net & if the web application is idle for some time & after that if we perform some action on that web page then it doesn''t respond. Can you

Determine the term- Security When using Internet, security can be enhanced using encryption. Debit and credit card transactions can also be protected by a specific type of pas

Using your cache simulator and using smalltex.din as your memory trace determine the total miss rate, compulsory miss rate, capacity miss rate, and conflict miss rate for the follo

In a pure combinational circuit is it necessary to mention all the inputs in sensitivity disk? if yes, why? Yes in a pure combinational circuit is it essential to mention all

Handling Interrupts: Precise interrupts (sequential semantics) Complete instructions before the offending instructions o   Force trap instruction into IF o

Define the translator which perform macro expansion is known as a                      Macro pre-processor is the translator which perform macro expansion

Which interface controls what is shown on the p.c.? Presentation Interface  controls what is shown on the p.c

How do you achieve workflow automation in e-business environment?   In order to run easily, organizations often standardize processes across the organization and encourage user