Question
Student Learning Outcomes. After completion of this lab, students will be able to write a Java program that Creates ArrayList Uses ArrayList methods Activity -
Student Learning Outcomes. After completion of this lab, students will be able to write a Java program that
Creates ArrayList
Uses ArrayList methods
Activity - Implement a program that implements a contact list using an ArrayList.
The program will contain two classes, ContactListEntry, and ContactList.
ContactListEntry
Instance variables: name, phone number and email address.
Default and parameterized constructors
Accessor and mutator methods.
ContactList
Create an ArrayList of ContactListEntry objects
Create at least 5 ContactListEntry object and add them to the ArrayList. No user input just hard code the entries.
Perform the following:
Use a for loop to display the ArrayList entries in a nicely format display.
Remove an entry from the list.
Use an enhanced for loop to display the ArrayList entries in a nicely format display.
Insert a new contact between the 2nd and 3rd entries in the list.
Display the list using either type loop.
Overwrite the last entry with a new contact. (Code should work for any size list)
Display the list using either type loop
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