Refactored SalaryCalculator to separate input/output from calculation;
fixed a bug in the calculation