Answered step by step
Verified Expert Solution
Question
1 Approved Answer
phone_book.cpp: libpb.c: libpb.h: Q3) Port the pre-project from C to C++. phone book.cpp is already done. Replace all of the C code in libpb.c and
phone_book.cpp:
libpb.c:
libpb.h:
Q3) 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 strudture 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
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