Question: Does anyone know how to make a flowchart and algorithm for this? c++ #include #include using namespace std; class Employee { public: string name; //string
Does anyone know how to make a flowchart and algorithm for this? c++
#include#include using namespace std; class Employee { public: string name; //string variable to hold the employee's name int idNumber; //an int variable that holds eployee's ID number string department; //string variable to hold the department name of the employee string position; //string that hold employee's job position /*constructor that holds arguments employee's name, employee's ID number, department, and position */ Employee (string empName, int empIdnumber, string empDepartment, string empPosition) { name = empName; idNumber = empIdnumber; department = empDepartment; position = empPosition; } /*constructor that holds arguments employee's name, employee's ID number. And to assign empty string to department and position */ Employee (string empName, int empIdnumber) { name = empName; idNumber = empIdnumber; department = ""; position = ""; } //Default constructor Employee () { name = ""; idNumber = 0; department = ""; position = ""; } //function to print the data void print () { cout << name << " " << idNumber << " " << department << " " << position << endl; } }; int main() { //OBJECT 1 Employee obj1 ("Susan Meyers", 47899, "Accounting", "Vice President"); obj1.print (); //OBJECT 2 Employee obj2("Mark Jones ",39119,"IT ","Programmer"); obj2.print(); //OBJECT 3 Employee obj3("Joy Rogers ",81774,"Manufacturing","Engineer"); obj3.print(); return 0; }
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
