//////////////////////////////////Employee.h//////////////////////////////////////// #include "stdafx.h" #include #include using namespace std; class Employee { public: Employee(string,string,int); void setFirstName(string); void setLastName(string); void setSalary(int); double calculate(int); string getFirstname(); string getLastname(); double getSalary(); void autoinput(); void print(); private: string firstname; string lastname; int salary; }; class Employee2 { public: Employee2(string,string,int); void setFirstName(string); void setLastName(string); void setSalary(int); double calculate(int); string getFirstname(); string getLastname(); int getSalary(); void print(); void autoinput(); private: string firstname; string lastname; int salary; }; class TEST { public: TEST(); int swich(int); private: int count; }; /////////////////////////////End///// Employee.h/////End////////////////////////////////// ////////////////////////////////// Employee.cpp/////////////////////////////////////////// #include "stdafx.h" #include #include using namespace std; using namespace System; #include #include #include "Employee.h" Employee::Employee(string Fname,string Lname,int Salary) { firstname = Fname; lastname = Lname; salary = Salary; } void Employee::setFirstName(string Fname) { firstname = Fname; } string Employee::getFirstname() { return firstname; } void Employee::setLastName(string Lname) { lastname = Lname; } string Employee::getLastname() { return lastname; } void Employee::setSalary(int sal) { salary = sal; } double Employee::getSalary() { return salary; } double Employee::calculate(int sal) { return static_cast(sal) * 1.1; } void Employee::print() { system("cls"); cout <(sal) * 1.1; } void Employee2::print() { system("cls"); cout <> c; system("cls"); return c; } //////////////////////////////////End/// Employee.cpp//////End///////////////////////////// ////////////////////////////////EmployeeClass.cpp : main project file./////////////////// #include "stdafx.h" #include #include using namespace System; using namespace std; #include "Employee.h" int main(array ^args) { string Fname = ""; string Lname = ""; string del = ""; int Salary_1 = 0; int r = 1; int count = 2; TEST u; count = u.swich(count); if(count == 1) { cout <<"Enter Employee#"<> Fname; system("cls"); cout <<"Enter Employee#"<> Lname; system("cls"); cout <<"Enter Employee#"<> Salary_1; r++; Employee E1(Fname,Lname,Salary_1); system("cls"); cout << E1.calculate(Salary_1); system("cls"); cout <<"Enter Employee#"<> Fname; system("cls"); cout <<"Enter Employee#"<> Lname; system("cls"); cout <<"Enter Employee"<> Salary_1; Employee2 E2(Fname,Lname,Salary_1); E1.print(); E2.print(); } if(count == 2) { Employee E1(Fname,Lname,Salary_1); Employee2 E2(Fname,Lname,Salary_1); E1.autoinput(); E2.autoinput(); E1.print(); E2.print(); } Console::ReadKey(); return 0; } ////////////////////////End//// EmployeeClass.cpp : main project file.///End///////////////