Java FX!!! Implement an address book application that will allow the user to enter a last name, address, and phone and email address. Optional: You may add additional fields for city, state, zip code,...


Java FX!!! Implement an address book application that will allow the user to enter a last name, address, and phone and email address. Optional: You may add additional fields for city, state, zip code, etc. if you wish. Your program will allow the user to sort, search, save the contact information in a text file, and load the contact information into the program. These requirements are outlined in further detail below:


Plan your application! Pseudo code or a flowchart is your friend. Really, it is! It must include the process to read an input file of the required contact data, saving a file, the sort algorithm you are using and the search algorithm you are using.


You must create a user defined class called Contact with the required fields above, appropriate constructor(s), setters, getters and a to String() method that returns a formatted string of all the contact information. It must also implement the Comparable interface (Java library interface). Build a Java GUI with clearly labelled text boxes for the required data, a list box to show the contacts as they are either entered or read from file (this is more for test/debug purposes), a second list box to show the array list after it’s sorted (test/debug as well), a label control to display search results, and buttons toad a contact to the storage structure you choose, sort the list, search (by last name), load a file, and save the array list to a file.


Within the application, contact data can be stored in a standard Java ArrayList any data structure you determine will work best for this application. For file operations, use the standard Java J File Chooser for selecting a file both for the load and save operation. You may use any of the Java file I/O library classes/methods you wish for reading and writing file data. File data must be stored in a comma separated value (CSV) format name, address, phone, email. Sample file: Smith. 123 Main sta [email protected] Adams 456 Main sta [email protected] Jones 789 Main sta [email protected] Thompson 1011 Main sta [email protected]


For sorting your data, you will (re)use the generic merge sort. You must sort by last name. For searching, you will (re)use the generic binary search you did in a lab exercise. The user will enter a name in the name text box. If the name is found in the list, display the rest of the contact data in the text boxes on the form. Display a “Not Found “message if the contact is not in the list.



May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here