Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Aluno: Pedro Paulo Freire Oliveira
- * Matrícula: 114110482
- */
- package lp2.lab07;
- abstract public class Contribuinte {
- protected String nome;
- private int num_contribuinte;
- private static int contribuintes_criados;
- protected double carro;
- protected double casa;
- protected double total_imposto = 0.0;
- public Contribuinte(){
- }
- protected void conta_contribuinte_criado(){
- contribuintes_criados++;
- }
- protected double calculaImposto(){
- if (tributacao() > desconto()) this.total_imposto += tributacao() - desconto();
- return this.total_imposto;
- }
- abstract protected double tributacao();
- abstract protected double desconto();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement