Skip to content

Instantly share code, notes, and snippets.

@felippepuhle
Last active September 20, 2017 11:56
Show Gist options
  • Select an option

  • Save felippepuhle/f8aedfa0c69ff9ee278c87d3aeb47280 to your computer and use it in GitHub Desktop.

Select an option

Save felippepuhle/f8aedfa0c69ff9ee278c87d3aeb47280 to your computer and use it in GitHub Desktop.
public interface Imposto {
double calcula(Orcamento orcamento);
}
public class ICMS implements Imposto {
public double calcula(Orcamento orcamento) {
return orcamento.getValor() * 0.1;
}
}
public class ISS implements Imposto {
public double calcula(Orcamento orcamento) {
return orcamento.getValor() * 0.06;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment