Está en la página 1de 2

// Además de los atributos de persona, tiene el siguiente atributo:

private double valorMatricula; // Valor de la Matrícula.

// Implementen abajo Constructor, Getter, Setter, toString() y el

// método public char obtenerNivel() -->

// -----------------------------------------------------------

public Estudiante(double valorMatricula, int tipo, String apellidos, String nombres, int cedula,
String tel, double puntaje) {

super(tipo, apellidos, nombres, cedula, tel, puntaje);

this.valorMatricula = valorMatricula;

// -----------------------------------------------------------

public double getValorMatricula() {

return valorMatricula;

public void setSalario(double valorMatricula) {

this.valorMatricula = valorMatricula;

@Override

public char obtenerNivel() {

if(4.0<=this.getPuntaje() && this.getPuntaje()<=5){

return 'A';

}else if(3.5<=this.getPuntaje() && this.getPuntaje()<4.0){


return 'B';

}else if(3.0<=this.getPuntaje() && this.getPuntaje()<3.5){

return 'C';

}else{

return 'D';

@Override

public String mostrarDatos(){

return "Los nombres y apellidos del trabajador son: " + nombres + " " + apellidos + " Su
puntaje fue: " + puntaje

+ " Su telefono y cedula son respectivamente " + tel + " y " + cedula + ", valor matricula: "
+ valorMatricula;

@Override

public String ajustarValor() {

String msj = "No se obtuvo el nivel suficiente para ajustar el valor";

if(this.obtenerNivel() == 'A' || this.obtenerNivel() == 'B'){

msj = "Valor ajustado a " + nombreC +"\t"+ (this.getValorMatricula()*0.90);

return msj;

También podría gustarte