📁 bigyahu/pooprojeto
_
□
x

acho que é um projeto de POO

git clone https://git.ganza.pt/bigyahu/pooprojeto.git

🍴 Fork (entrar)

branch: master · commits

socioIndividual.java

public class socioIndividual extends socio {
    private int anoNascimento;

    public socioIndividual(String nome, int numero, String email, int anoNascimento) {
        super(nome, numero, email);
        this.anoNascimento = anoNascimento;
    }
    public int getAnoNascimento() {
        return anoNascimento;
    }
    public double calcularDesconto(int anoAtual) {
        int idade = 2026 - anoNascimento;
        if (idade <18) {
            return 0.10;
        }
        if (idade >=65 ){
            return 0.15;
        }
        else {
            return 0.0;
        }
    }
    public String toString() {
        return super.toString() + "| Ano de Nascimento: " + anoNascimento + "| Tipo: Individual";
    }
}
🌿 git.ganza.ptcontas ganzaGIT
ganzaGIT v4.20 ~ git clone https://git.ganza.pt/user/repo.git