Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / CREATE AN ADDRESS BOOK PROGRAM Here is what you will need to do to create your Address Book application

CREATE AN ADDRESS BOOK PROGRAM Here is what you will need to do to create your Address Book application

Computer Science

CREATE AN ADDRESS BOOK PROGRAM

Here is what you will need to do to create your Address Book application.

  1. In the MySQL Workbench server management application:
    1. Create a database if you have not already created one.
    2. Create a table called "addressbook" with the following fields
      1. ID as an Int, set to primary key, set AutoIncrement = yes
      2. FirstName as a varchar of length 30
      3. LastName as a varchar of length 30
      4. Address as a varchar of length 30
      5. City as a varchar of length 30
      6. State as a varchar of length 2
      7. ZipCode as a varchar of length 10
      8. Phone as a varchar of length 14
  2. In the Netbeans project, add the MySQL jar file to the project:
    1. Download the MySQL connector file from the MySQL website.
    2. Move only the MySQL connector file to the root of the NetBeans project folder.
    3. Right-click on Libraries and choose "Add JAR/Folder..."
    4. Navigate to the NetBeans project folder and select the MySQL connector file.
    5. Confirm that "Relative Path" is select and only the file name show (no ellipsis at all).
  3. Create a Contact class
    1. Allows you to pass around a single object instead of eight attributes in the methods
  4. Create a DataIO class to contain the database connection methods
    1. Create these constants and update the values based on your credentials:
      1. CONNECTION_STRING
      2. USER_NAME
      3. PASSWORD
    2. In the DataIO class, create the following methods and add the appropriate code:
      1. add( ) method receives a Contact object and write the information to the database
      2. getList( ) method gets all of the contacts from the database and returns an ArrayList with the contacts
  5. Create a GUI for your Address Book
    1. Add labels and textfields to get the input for the Contact information
    2. Add two buttons (Add Contact and Show Contacts)
    3. Add a JTable at the bottom to show the Contact records
  6. Add the code for the Add Contact button.
    1. When the user clicks the Add Contact button:
      1. Get the Contact info from the textfields
      2. Create a Contact object using the information
      3. Add the record to the database using the DataIO  add( )  method.
  7. Add the code for the Show Contacts button.
    1. When the user clicks the Show Contacts button:
      1. Get all of the records from the database using the DataIO  getAll( ) method
      2. Display the records in a textarea or JTable.

Option 1

Low Cost Option
Download this past answer in few clicks

19.99 USD

PURCHASE SOLUTION

Already member?


Option 2

Custom new solution created by our subject matter experts

GET A QUOTE