Created
November 12, 2010 13:46
-
-
Save mauricioaniche/674096 to your computer and use it in GitHub Desktop.
CalculadoraDeSalario - Exemplo 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CalculoDeSalario { | |
public CalculoDeSalario(RegrasFiscais regrasFiscais, ...) { | |
// ... | |
} | |
public double calcula(Funcionario f) { | |
if(f.getCargo() == Cargo.VENDEDOR) { | |
// calcula salario do vendedor usando regras fiscais, etc | |
} | |
if(f.getCargo() == Cargo.GERENTE) { | |
// calcula salario do gerente usando regras fiscais, etc | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment