Skip to content

Instantly share code, notes, and snippets.

@coderunner
Created January 14, 2012 03:32
Show Gist options
  • Select an option

  • Save coderunner/1610134 to your computer and use it in GitHub Desktop.

Select an option

Save coderunner/1610134 to your computer and use it in GitHub Desktop.

Revisions

  1. coderunner created this gist Jan 14, 2012.
    10 changes: 10 additions & 0 deletions SalaryFunctions.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    public class SalaryFunctions {

    public int computeBonus(Employee employee, float factor) {
    return Math.round(employee.salary * factor * employee.targetBonus);
    }

    public int getWeeklySalary(Employee employee) {
    return Math.round(employee.salary / 52f);
    }
    }