Creating a contacts application, Computer Engineering

Assignment Help:

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"


Related Discussions:- Creating a contacts application

What is visualisation - search based tools, Q. What is Visualisation - sear...

Q. What is Visualisation - search based tools? Visualization is a common method in contract to search based tools. In this scheme visual aids are supplied as pictures to help p

How speech is transmitted in a digital switching environment, How speech is...

How speech is transmitted in a digital switching environment using PCM/TDM? A digital carrier system is a communications system which uses digital pulses quite than analogue si

Explain the uses of keyboards, Explain the uses of Keyboards An alphanu...

Explain the uses of Keyboards An alphanumeric keyboard for a graphics system is used primarily as a device for entering text strings. Keyboards can also be provided with featur

Determine the uses of programming language interface, Determine the uses of...

Determine the uses of Programming Language Interface PLI  is  used  for  implementing  system  calls  that would  have  been  hard  to  do  otherwise  (or impossible) using Ve

What is load testing, Load testing is to test that if the application works...

Load testing is to test that if the application works well with the loads that result from large number of concurrent users, transactions and to verify whether it can handle peak u

Explain demand paging, What is Demand paging? Virtual memory is commonl...

What is Demand paging? Virtual memory is commonly executed by demand paging. In demand paging, the pager brings only those essential pages into memory instead of swapping in a

How the information should be retrieved from the database, In a report with...

In a report with an LDB attribute, you do not have to explain how the information should be retrieved from the database tables, but only how the data should be shown on the screen.

Vector processing with pipelining-vector processing, Vector Processing with...

Vector Processing with Pipelining: Since in vector processing, vector instructions perform the similar computation on dissimilar data operands repeatedly, vector processing is most

The method(s) of payment for online consumers, The method(s) of payment for...

The method(s) of payment for online consumers are A) Electronic cash    (B) Credit/debit C) Electronic checks

There no polymorphic-type response, Why is there no polymorphic-type respon...

Why is there no polymorphic-type response from a create() or find() method? Ans) The EJB Specification forbids this behavior, and the weblogic.ejbc compiler checks for this beha

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd