Employe 2
Employe 2
*/
#include <iostream>
#include <stdio.h>
class basicInfo
protected:
char name[30];
int empId;
char gender;
public:
void getBasicInfo(void)
cin.getline(name,30);
};
class deptInfo
protected:
char deptName[30];
char assignedWork[30];
int time2complete;
public:
void getDeptInfo(void)
cin.ignore(1);
cin.getline(deptName,30);
fflush(stdin);
cin.getline(assignedWork,30);
};
public:
void getEmployeeInfo(void){
void printEmployeeInfo(void)
{
cout << "Name: " << name << endl; //accessing protected data
cout << "Employee ID: " << empId << endl; //accessing protected data
cout << "Gender: " << gender << endl << endl;//accessing protected data
cout << "Department Name: " << deptName << endl; //accessing protected
data
cout << "Assigned Work: " << assignedWork << endl; //accessing
protected data
cout << "Time to complete work: " << time2complete<< endl; //accessing
protected data
};
int main()
employee emp;
emp.getEmployeeInfo();
emp.printEmployeeInfo();
return 0;
SUBMIT ORDER
and get a quick answer at the best price