Table of Contents

Interface IStudentLoanCalculator

Namespace
Payetools.StudentLoans
Assembly
Payetools.StudentLoans.dll

Interface that student loan calculators must implement.

public interface IStudentLoanCalculator

Methods

Calculate(decimal, StudentLoanType?, bool, out IStudentLoanCalculationResult)

Calculates the necessary student loan deduction based on the input salary, the student loan type (if applicable) and indication of whether to apply post-graduate loan deductions.

void Calculate(decimal grossSalary, StudentLoanType? studentLoanType, bool hasPostGradLoan, out IStudentLoanCalculationResult result)

Parameters

grossSalary decimal

Gross salary.

studentLoanType StudentLoanType?

Optional student loan type. Null if no student loan applies.

hasPostGradLoan bool

True if post-graduate loan deductions should be applied; false otherwise.

result IStudentLoanCalculationResult

An implementation of IStudentLoanCalculationResult containing the results of the calculation.