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 are the important tools of a three-tier client server, What are the im...

What are the important tools of a three-tier client server? In a three-tier or multi-tier environment, there the client implements the presentation logic or the client. The bus

Dimensionality of interconnection network, Dimensionality of Interconnectio...

Dimensionality of Interconnection Network Dimensionality signify the arrangement of nodes or processing elements in an interconnection network. In linear network or one dimensi

Show the conflict in register, Q. Show the conflict in register? All mi...

Q. Show the conflict in register? All micro-operations written on a line are to be executed at same time provided the statements or a group of statements to be implemented toge

Explain the criteria to classify data structures, Explain the criteria to c...

Explain the criteria to classify data structures used for language processors? The data structures utilized in language processing can be classified upon the basis of the subse

Game playing - artificial intelligence, Game Playing: We have now disp...

Game Playing: We have now dispensed with the necessary background material for AI problem solving techniques, and we just considered to looking at particular types of problems

Calculate switching capacity in a two stage network, In a two stage network...

In a two stage network there are 512 inlets and outlets, r=s=24. If the probability that a given inlet is active is 0.8, calculate: Switching capacity Given: N =M =512, α

Economic argument for good design, One way of demonstrating the importance ...

One way of demonstrating the importance of good ID is by showing tangible benefits that can be talked about in cash terms. Within a business, good ID can lead to benefits such as h

Internal conditioning, types of internal conditioning with explanations and...

types of internal conditioning with explanations and examples

Interrupt - driven input-output, Q. Interrupt - Driven Input-output? Pr...

Q. Interrupt - Driven Input-output? Problem with programmed I/O is that processor has to wait a long time for I/O interface to see whether a device is free or waits until compl

Perform binary addition and subtraction on two numbers, Q Develop a menu ...

Q Develop a menu driven program to perform Binary addition and subtraction on two numbers that are inputted. Check that entered numbers are in base 2 or not else error messag

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