Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem description: Port the Projectl from C to C++. employee list.cpp is already done. Replace all of the C code in libel.c and libel.h (from

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Problem description: Port the Projectl from C to C++. employee list.cpp is already done. Replace all of the C code in libel.c and libel.h (from you C project code) with C++ code. Rename libel.c to libpel.cpp and libel.h to libel.hpp. Convert the personal info structure into a class with three private data member strings for the first name, last name, and position and one private data member double for the salary. To access private members of a class, there are typically pub- lic 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 libel.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). Public member function prototypes for the personal info class: void setFirst(string first); void setLast (string last); void setPosition(string position); void setSalary(double salary); string getFirst); string getLast ; string getPositionO; double getSalary); Problem description: Port the Projectl from C to C++. employee list.cpp is already done. Replace all of the C code in libel.c and libel.h (from you C project code) with C++ code. Rename libel.c to libpel.cpp and libel.h to libel.hpp. Convert the personal info structure into a class with three private data member strings for the first name, last name, and position and one private data member double for the salary. To access private members of a class, there are typically pub- lic 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 libel.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). Public member function prototypes for the personal info class: void setFirst(string first); void setLast (string last); void setPosition(string position); void setSalary(double salary); string getFirst); string getLast ; string getPositionO; double getSalary)

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions

Question

2. What are your challenges in the creative process?

Answered: 1 week ago