Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

image text in transcribed

phone_book.cpp:

image text in transcribed

image text in transcribed

libpb.c:

image text in transcribed

libpb.h:

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke

1st Edition

0130086509, 978-0130086501

More Books

Students also viewed these Databases questions

Question

Identify sustainable HRM practices in an organization.

Answered: 1 week ago