Question: 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




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
Get step-by-step solutions from verified subject matter experts
