Payroll

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 ?

I got lots of ideas, how about you ?

What did they teach you is the first step to writing any program ?
Last edited on
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.)
sorry late reply , nvm guys . already know how to do it , thnx btw
Topic archived. No new replies allowed.