Olá fiz esse programa mais ao rodar ele não mostra os resultado. O que está faltando? Obrigado.
<
package exe4;
/**
*
* @author Morato
*/
public class Pessoa {
private String nome;
private int contribuinte;
private int idade;
/**
* @return the nome
*/
public String getNome() {
return nome;
}
/**
* @param nome the nome to set
*/
public void setNome(String nome) {
this.nome = nome;
}
/**
* @return the contribuinte
*/
public int getContribuinte() {
return contribuinte;
}
/**
* @param contribuinte the contribuinte to set
*/
public void setContribuinte(int contribuinte) {
this.contribuinte = contribuinte;
}
/**
* @return the idade
*/
public int getIdade() {
return idade;
}
/**
* @param idade the idade to set
*/
public void setIdade(int idade) {
this.idade = idade;
}
}
package exe4;
/**
*
* @author Morato
*/
public class Empregado extends Pessoa {
private int matricula;
private double salario;
private String setor;
/**
* @return the matricula
*/
public int getMatricula() {
return matricula;
}
/**
* @param matricula the matricula to set
*/
public void setMatricula(int matricula) {
this.matricula = matricula;
}
/**
* @return the salario
*/
public double getSalario() {
return salario;
}
/**
* @param salario the salario to set
*/
public void setSalario(double salario) {
this.salario = salario;
}
/**
* @return the setor
*/
public String getSetor() {
return setor;
}
/**
* @param setor the setor to set
*/
public void setSetor(String setor) {
this.setor = setor;
}
public double calcularSalario(){
return salario - salario * 0.11;
}
}
>