(CSE101)
Topic: “Pay Calculation of Employee”
(Simple Salary Statement)
The term “Salary” includes remuneration in any form for person service, under an
expressed or implied contract of employment or service. Salary is used for payroll
employee and wages is used for contractual. Salary or wages can be calculated on
the number of days in the month.
Basic Salary
Advance of salary
Arrear of salary
Other allowance
About Programming
How to calculate the pay calculation of employee?
I will start with the abstract employee class and derive out concrete
employee classes from it. In “C” programming I have built in enumeration interface.
So I can create an abstract Employee interface that returns an Enumerator. Our
concrete employee class will store name and salary of each employee and allow us
to fetch them as needed. The employee class must have concrete implementations
of the add, remove, get Child, and subordinates is a leaf, all of these will return
some short of error indication. The subordinate’s method could return a null but
programming will be more consistent if subordinates return an empty enumeration.
I will use some important function as like that return(), array(), string(),
getch(). Starts with the salary of the current employee and then calls the get
Salary() method on each subordinate. This is , of cause ,recursive and any
employees who have subordinates will be include.
Name of employee -
Month -