Question: C++ coding assigment 5 remainder: due not right in java. Make sure to right c++ in different files This small project is geared to test

C++ coding assigment 5

remainder: due not right in java. Make sure to right c++ in different files

This small project is geared to test your understanding of File IO.

AddressBook Exception

Create an AddressBookException class that you can use to throw exceptions in your address book. Your class should have a constructor that will allow you to set the particular message that corresponds to the error.

You should use your custom exception class to throw an error in the findPerson method if the person being searched for cannot be found, in the getPerson method if the AddressBook is empty. You should also throw an error any time that the addressbook file that you are attempting to read or write from cannot be opened.

In main test your AddressBook exception class by placing a try - catch around any code that could possibly throw an error. Supply a catch block to catch the AddressBook exception and provide a catch all block just in case an exception is thrown the you may have missed.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!