Question: 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

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 and mutator methods. Then write a program that creates at least five PhoneBookEntry objects and stores them in an ArrayList. Use a loop to display the contents of each object in the ArrayList.

Step by Step Solution

3.40 Rating (163 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

public class PhoneBookEntry private String name private String phoneNumber p... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Starting Out With Java From Control Structures Questions!