QuestionQ14
Agile software development and Test TechniquesA new Payroll system calculates the tax amount each employee must pay (TaxToPay) on their gross monthly salary (in €), along with the net salary (NetSal) they will receive after that tax has been deducted.
It also calculates the year-to-date (YTD) tax (TaxPdYTD) and net-salary (SalPdYTD) amounts by adding them to the stored values from the previous month (these are zero for month 1).
Inputs include Employee Id (Empld) and this month's Gross Salary (GrossSal). Tax Rate is looked up using Employee Id as the key; the YTD tax and net-salary amounts are looked up using (Employee Id and [month - 1]) as the key, except that they are zero for month 1.
If both employees were paid the same in month 1 as in the current month 2, for which tax must now be calculated, which data-driven input and expected-output table is correct for this situation?
Community Discussion