It's my revision question. Please help...
Create a Class Employee. This class holds member variables: employee number and salary. It has an array of 4 employees and includes 4 employee number and salary.
Has 2 member functions:
Get() employee detail, namely number and salary
Display() employee detail
Create main()
I'm really not sure how to do the arrays and please correct my mistakes..
class Employee
{
private:
int eNumber;
double eSalary;
public:
Employee()
{
eNumber = 1;
eSalary = 1000;
}
double getESalary();
void displayInfo();
};
int Employee::getENumber()
{ return eNumber;
}
double Employee::getESalary()
{ return eSalary;
}
void Employee::displayInfo()
{ cout << endl << "Number : " << eNumber;
cout << endl << "Salary : " << eSalary;
} int getENumber();