Question
Plz use JAVA to write this code???AND follow all provided rules Enter 1 to add contact, 2 to display, 3 to search, 4 to delete,
Plz use JAVA to write this code???AND follow all provided rules
Enter 1 to add contact, 2 to display, 3 to search, 4 to delete, 5 to quit: 1
Enter last name: Adams
Enter first name: John
Enter Street name: Vernon
Enter phone number: 555-1234
Enter 1 to add contact, 2 to display, 3 to search, 4 to delete, 5 to quit: 1
Enter last name: Smith
Enter first name: Amy
Enter Street name: Robie
Enter phone number: 555-4567
Enter 1 to add contact, 2 to display, 3 to search, 4 to delete, 5 to quit: 1
Enter last name: Brown
Enter first name: Adam
Enter Street name: Robie
Enter phone number: 555-9812
Enter 1 to add contact, 2 to display, 3 to search, 4 to delete, 5 to quit: 2
Name Street Number
Adams, John Vernon 555-1234
Brown, Adam Robie 555-9812
Smith, Amy Robie 555-4567
Enter 1 to add contact, 2 to display, 3 to search, 4 to delete, 5 to quit: 3
Enter 1 to search name, 2 to search address, 3 to search phone number: 3
Enter what to search: 555-9812
Name Street Number
Brown, Adam Robie 555-9812
Enter 1 to add contact, 2 to display, 3 to search, 4 to delete, 5 to quit: 3
Enter 1 to search name, 2 to search address, 3 to search phone number: 2
Enter what to search: Robie
Name Street Number
Brown, Adam Robie 555-9812
Smith, Amy Robie 555-4567
Enter 1 to add contact, 2 to display, 3 to search, 4 to delete, 5 to quit: 4
Enter 1 to search name, 2 to search address, 3 to search phone number, 4 to display all contacts: 2
Enter what to search: Robie
Name Street Number
1. Brown, Adam Robie 555-9812
2. Smith, Amy Robie 555-4567
Entry to delete: 2
Enter 1 to add contact, 2 to display, 3 to search, 4 to delete, 5 to quit: 2
Name Street Number
Adam, John Vernon 555-1234
Brown, Adam Robie 555-9812
Enter 1 to add contact, 2 to display, 3 to search, 4 to delete, 5 to quit: 5
Good-bye!
In this assignment, you will design a class called Addessek 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.utilLinkedlist 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 Contact private String lastName private String firstName private String streetName: private String phone; //complete the rest of the class by adding appropriate constructors, get, set methods, toString, etc.+ le 2. Re-design the Node class to hold Contact as its data. 3. Re-design the Linked List class that we developed in class so that the methods will work with Nodes with Contacts as its data. Finally, you will create the AddcessBook 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.+ 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started