Question
I need this program in java code, I wrote one but something is not working properly! the user should entry the information for (5 people)
I need this program in java code, I wrote one but something is not working properly!
the user should entry the information for (5 people)
and at the end all names and phone numbers should appear on the screen
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 (getter) and mutator (setter) 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.
the output should look like this
Enter person name: Anna
Enter person Phone: 333-4444
Enter person name: Milly
Enter person Phone: 222-5555
Enter person name: George
Enter person Phone: 111-4444
Enter person name: Summer
Enter person Phone: 213-2121
Enter person name: Ken
Enter person Phone: 555-5555
Persons information
Name: Anna
Phone: 333-4444
-------------------------------------------
Name: Milly
Phone: 222-5555
-------------------------------------------- and so on....
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