Advertisement
PedroPauloFO

Contribuinte

Nov 25th, 2014
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. /*
  2. * Aluno: Pedro Paulo Freire Oliveira
  3. * Matrícula: 114110482
  4. */
  5.  
  6. package lp2.lab07;
  7.  
  8. abstract public class Contribuinte {
  9. protected String nome;
  10. private int num_contribuinte;
  11. private static int contribuintes_criados;
  12. protected double carro;
  13. protected double casa;
  14. protected double total_imposto = 0.0;
  15.  
  16. public Contribuinte(){
  17.  
  18. }
  19.  
  20. protected void conta_contribuinte_criado(){
  21. contribuintes_criados++;
  22. }
  23.  
  24. protected double calculaImposto(){
  25. if (tributacao() > desconto()) this.total_imposto += tributacao() - desconto();
  26. return this.total_imposto;
  27. }
  28.  
  29. abstract protected double tributacao();
  30.  
  31. abstract protected double desconto();
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement