The problem is : Case scenario
Calulating payroll for employee
Each of the employee will be recognized by employee ID. The system will receive
gross income, allowance, overtime, income tax and loan deduction. The system will automatically calculate the total income, total deduction and net salary for the employee. Any idea guys how to create it guys ?
Make a class Employee having a string or int ID , a double total income , double total deduction,double net salary. Add a member function called calculatePayroll with parameters double income,overtime,income tax and loan deduction. Within the method do your calculation. Then simply make getters for your class attributes(Id,total income,etc.)