Create an Employee class. Attributes(must be private): Employee has a name and basic_salary Methods: Employee(string, float); //Constructor Allowances are computed as: float getHouseRent(); //House rent is 45% of the basic pay. float getMedicalAllowance(); //Medical Allowance is 5% of the basic pay. float getConveyanceAllowance(); //Conveyance allowance is 10% of the basic pay float getGrossPay(); //Salary including rent and allowances {You can implement additional function/s if needed} Then Create an Organization class. Organization has 10 Employees (Hint: You will need an array of pointers to Employee class) Organization can calculate the total amount to be paid to all employees Organization can print the details(name & salary) of all employees Note: Use main,header and functions.cpp to write code.
Create an Employee class.
Attributes(must be private):
Employee has a name and basic_salary
Methods:
Employee(string, float); //Constructor
Allowances are computed as:
float getHouseRent(); //House rent is 45% of the basic pay.
float getMedicalAllowance(); //Medical Allowance is 5% of the basic pay.
float getConveyanceAllowance(); //Conveyance allowance is 10% of the basic pay
float getGrossPay(); //Salary including rent and allowances
{You can implement additional function/s if needed}
Then
Create an Organization class.
Organization has 10 Employees (Hint: You will need an array of pointers to Employee class)
Organization can calculate the total amount to be paid to all employees
Organization can print the details(name & salary) of all employees
Note: Use main,header and functions.cpp to write code.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 4 images