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
Describe the advantage of using Booth algorithm? Ans:  a) It achieves efficiency in the number of additions needed when the multiplier has a few large blocks of 1's. b) It

E ngaged tone is generated in the: (A)  Telephone instrument of calling subscriber (B)  Telephone instrument of called subscriber (C)  Exchange (D)  Repeater

Does swapping increase the Operating Systems' overheads? Justify your answer. A process can be swapped out temporarily of memory to a backing store and after that brought back

What are the advantages and disadvantages of public key cryptography? Advantages and Disadvantages: Improved security and convenience: private keys never require be trans

Q. What is Parallel Loop Construct? Parallel loop construct is a shortcut for specifying parallel construct comprising one loop construct and no other statements. The syntax of

Signaling - Universal Serial Bus: USB supports following signaling rates: o   A low speed rate of 1.5 Mbit/s is defined by USB 1.0. This is so much similar to "full speed"

What is a spanning Tree? A spanning tree is a tree associated with a network. All the nodes of the graph appear on the tree once. A minimum spanning tree is a spanning tree

What is data hazard? Any condition that causes the pipeline to stall is known as a hazard. A data hazard is any condition in which either the source or destination operands of

Prepare at least 3 sets of input data (Test data) along with expected output for testing your program.

List the major activities of an operating system with respect to memory management, secondary storage management and process management. Operating system is causes for followin