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();
How is the array is supposed to be inserted into the function? Can show me please, I am really at loss...
Let's say 4 employee number and salary, (a1, 100; b2, 200; c3, 300; d4, 400)