Question: Port the pre-project from C to C++. phone book.cpp is already done. Replace all of the C code in libpb.c and libpb.h (provided in the

 Port the pre-project from C to C++. phone book.cpp is alreadydone. Replace all of the C code in libpb.c and libpb.h (providedin the supplementary folder) with C++ code. Rename libpb.c to libpb.cpp and

libpb.h to libpb.hpp. Convert the personal info structure into a class withthree private data member strings for the first name, last name, andphone num- ber. To access private members of a class, there aretypically public get and set functions. Get/set member function prototypes for the

Port the pre-project from C to C++. phone book.cpp is already done. Replace all of the C code in libpb.c and libpb.h (provided in the supplementary folder) with C++ code. Rename libpb.c to libpb.cpp and libpb.h to libpb.hpp. Convert the personal info structure into a class with three private data member strings for the first name, last name, and phone num- ber. To access private members of a class, there are typically public get and set functions. Get/set member function prototypes for the data members of the class personal info are shown below (to be added into your libpb.hpp file). There is a get and a set for each private data member. A set function will set the private member equal to the functions input. A get function will return the private member's value. This is typically good practice for things that should not be accessed directly (think of them as hidden from the end user)

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!