Question
I want you to create the address book with a dynamic array (chapter 10 pointers). You may rehash YOUR previous program (not someone else's program)
I want you to create the address book with a dynamic array (chapter 10 pointers). You may rehash YOUR previous program (not someone else's program) or you may start it from scratch.
Create a class called AddressBook. When the object is created, the programmer should specify the maximum number of items in the addressbook. (e.g.) AddressBook myAddressBook(20); It should contain a method called addName that will take a name and phone number and add it to the address book. There should be a method called findName that will take a string for the name and return the phone number if found in the list otherwise return Person Not Found. The class should have a method called display to show all the entries in the address book sorted by last name (last name, first name). Create a main function to test your class. Inside the main ask for five names and enter them into the address book. In the main, look for one that is in the address book and test for a name that is not in the address book. Finally, in the main, display the names in alphabetical order from the address book. You may have the sort inside the class AddressBook.
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