Question: This week well practice using ArrayList and the Comparable Interface. We will write a class to represent a Phone Book Entry with first name, last
This week well practice using ArrayList and the Comparable Interface. We will write a class to represent a Phone Book Entry with first name, last name, and phone number. Then we will write a class to represent the Phone Book Catalog that holds all of the phone book entries. Sample Output 1 going to a k you to entor 5 nams snd plane ubers. Enter a person's fiest nanes Teed Entel a peradn . Enter that person's phone munber:0-45-5 Enter a person's frst nane: Enter a person's first nane: Clarence Enter that person's phone munbe: 99-182-65 Enter a person's fist nane: Enter that peson's phone sunbe 62-56-89 Rere"s the data you entered: the ae racy ohaston 762-456-8952 ame: Any hopson Phone berI 750-456-7852 Phone mmber: 929-702-6554 Fred Watson PhoneBookEntry class PARTI Write a class named PhoneBookEntry that keeps up with the first name, last name, and phone number of a person. This class will implement the Comparable Interface for Type PhoneBookEntry Declare three instance variables (fields) for the
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
