Skip to content

StudentsOnly/20-java-contact-list-linkedlist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Exercise: Contact List using LinkedList in Java

Objective:

The objective of this exercise is to create a basic contact list management system using a LinkedList in Java. You will model the process of adding contacts, searching for contacts, and displaying the contact list.

Scenario: Contact List Management

Imagine you are building a program to manage a contact list. Users can add contacts to the list, search for contacts by name, and display the list of contacts. You will implement this functionality using a LinkedList.

Guidelines:

  1. Create a class named Contact with the following attributes:
    • String name: to store the name of the contact.
    • String phoneNumber: to store the phone number of the contact.
  2. Create a class named ContactList that includes the following methods:
    • addContact that adds a new contact with the given name and phone number to the LinkedList.
    • searchContact that searches for a contact by name and returns the contact's information if found.
    • displayContacts that displays the details of all contacts in the list.
  3. Create instances of the ContactList class in the main method.
  4. Add contacts to the list, search for contacts, and display the contact list.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages