Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using NetBeans, write an object-oriented program that implements an address book. This should be a normal Java console application (like the RectangleCalculation exmaple) - do

Using NetBeans, write an object-oriented program that implements an address book. This should be a normal Java console application (like the RectangleCalculation exmaple) - do not write a Tomcat web application for this assignment.

Your program should allow the user to store contact information for people he/she knows. The contact information we want to store is: name, phone number, and e-mail address. Create a Contact class to store this information.

You will also need a main class to contain the logic for your program. This class will store Contact objects in an ArrayList (similar to the RectangleCalculation example).

Your main class should include a menu with the following options:

  1. Add Contact
  2. Delete Contact
  3. Edit Contact
  4. Display Contacts
  5. Quit

Add Contact

When the user wants to add a contact, prompt the user for the name, phone number, and e-mail address of the new contact. Create a Contact object, store the information in this object, and add the object to the ArrayList.

Delete Contact

When the user wants to delete a contact, prompt the user for the contact's name. Find the appropriate Contact object in the ArrayList, and remove it from the list.

Edit Contact

When the user wants to edit a contact, prompt the user for the contact's name. Find the appropriate Contact object in the ArrayList, and display that contact's information. Prompt the user to enter new information (name, address, and phone number). Delete the old object from the ArrayList and add a new Contact object at the end of the list. You can assume that your address book does not contain two people with the same name.

Display Contacts

Display the contacts by printing the names, addresses, and phone numbers to the screen. Display the information in a nice, easy-to-read format. Display all the information for the first contact, then the second contact, then the third contact, and so on.

Quit

When the user selects the "Quit" option, your program should end.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Informix Database Administrators Survival Guide

Authors: Joe Lumbley

1st Edition

0131243144, 978-0131243149

More Books

Students also viewed these Databases questions

Question

5. A review of the key behaviors is included.

Answered: 1 week ago