Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

The Database Experts Guide To SQL

Authors: Frank Lusardi

1st Edition

0070390029, 978-0070390027

More Books

Students also viewed these Databases questions

Question

What did they do? What did they say?

Answered: 1 week ago