1. An EMPLOYEE class contains the following members:
Data members: employee_number, employee_name, basic pay, allowance, income tax, net salary
Member functions: to read the data, to calculate net salary and to print data members
Write a C++ program to read the data of 5 employees and compute the net salary of each employee given that the allowance is 20% of the basic pay and income tax is 30% of the gross salary (basic pay+allowance)
}; int main() { Employee mas[5]; for (int i = 0; i < 5; i ++) { mas[i].ReadData(i+1); mas[i].CalculateNetSalary(); } system("cls"); for (int i = 0; i < 5; i ++) mas[i].DisplayInformation(); system("pause"); return 0; }
Comments
Leave a comment