Estudiante

Estudiante - r public void setMatricula(int m){ matricula =...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
public class Estudiante extends Persona{ p public int matricula; public double calif1, calif2, calif3; p public Estudiante(){ super(); matricula=0; calif1=0; calif2=0; calif3=0;} c public Estudiante(String nom, int ed, double es, int mat, double c1, double c2, double c3){ super(nom, ed, es); // El orden depende del constructor matricula=mat; calif1=c1; calif2=c2; calif3=c3;} c public int getMatricula(){ return matricula;} r public double getCalif1(){ return calif1;} r public double getCalif2(){ return calif2;} r public double getCalif3(){ return calif3;}
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: r public void setMatricula(int m){ matricula = m;} m public void setCalif1(int c1){ calif1 = c1;} c public void setCalif2(int c2){ calif2 = c2;} c public void setCalif3(int c3){ calif3 = c3;} c public double dimePromedio(){ //No recibe promedio porque el objeto ya sabe su informacin return (calif1+calif2+calif3)/3.0;} r public String toString(){ return super.diceNombre()+", mis calificaciones son: "+calif1+", "+calif2+", "+calif3+", por eso, mi promedio es: "+dimePromedio();} " }...
View Full Document

This note was uploaded on 10/29/2009 for the course ITC TC-1002 taught by Professor X during the Spring '09 term at ITESM.

Ask a homework question - tutors are online