Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do the code in Java and do not use any sort of packages! I only need the address book class done, especially the add

Please do the code in Java and do not use any sort of packages! I only need the address book class done, especially the add contact method since I can not sort it alphabetically (has to use COMPARETO method, not any pre-existing methods in the linked list class, arraylists, or collections).

image text in transcribed

image text in transcribed

In this assignment, you will design a class called AddressBook that uses a Linked List to store nodes that are made up of Contacts. You must adapt the Node class that we wrote in class, and adapt and add to the Linked List class that we developed together (You cannot use java.utilLinkedist for this assignment) 1. Start by designing the Contact class that holds a person's last name, first name, street name, and phone number: public class Contactt private String lastName private StrigistName private String streetName: private String phone; //complete the rest of the class by adding appropriate constructors, get, set methods, toString, etc. 2. Re-design the Node class to hold Contact as its data 3. Re-design the Linked List class that we develope n class so that the methods will work with Nodes with Contacts as its data 4. Finally, you will create the AddressBook class. It has a LinkedList and methods to add a contact, display all contacts, search for a specific contact and display it, or search and delete a specific contact. AddressBook: When a contact is added, it should be added in order alphabetically to the list by last name (and then by first name if there are multiple contacts with the same last name). To add alphabetically look at the compareTo String method which compares Strings lexicographically (returns an int>0,

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

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

13th Edition Global Edition

1292263350, 978-1292263359

More Books

Students also viewed these Databases questions

Question

1. What would you do if you were Jennifer, and why?

Answered: 1 week ago