Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a class named PhoneBookEntry that has fields for a person s name and phone number. The class should have a constructor and appropriate accessor

Write a class named PhoneBookEntry that has fields for a persons name and phone number. The class should have a constructor and appropriate accessor and mutator methods. Then write a program that creates three PhoneBookEntry objects and stores them in an ArrayList. Use a loop to display the contents of each object in the ArrayList. (You must use an ArrayList class to complete this program. See section 7.13). Once you are done displaying the contents of each object, ask the user to enter a phone number to be removed. If the phone number belongs to an object in the ArrayList, remove that object. Then display the contents of each object again as shown in the screenshots.
image text in transcribed

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

Introduction To Constraint Databases

Authors: Peter Revesz

1st Edition

1441931554, 978-1441931559

More Books

Students also viewed these Databases questions