You are on page 1of 3

public class alumno {

private int ncontrol;


private int edad;
private int c1,c2,c3,c4;
private String nombre;
private String sexo;

public alumno(int nc,String nom,int edd, String sx){

this.ncontrol=nc;
this.nombre=nom;
this.edad=edd;
this.sexo=sx;
}

public alumno(int nc,int edd, int b1,int b2, int b3, int b4, String nom, String
sx){

this.ncontrol=nc;
this.edad=edd;
this.c1=b1;
this.c2=b2;
this.c3=b3;
this.c4=b4;
this.nombre=nom;
this.sexo=sx;
}

public void calcularpromedio (){

int prom=(getC1()+getC2()+getC3()+getC4())/4;

if( prom<70){

System.out.println(" el alumno "+nombre+" \n sexo "+sexo+"\n de edad


"+getEdad()+" \n ALUMNO IRREGULAR su calificacion fue: "+prom);
}

if( prom > 70 && prom <90){

System.out.println(" el alumno "+nombre+" \n sexo "+sexo+"\n de edad


"+getEdad()+" \n ALUMNO NORMAL su calificacion fue: "+prom);
}

else{

if( prom > 90){

System.out.println(" el alumno "+nombre+" \n sexo "+sexo+"\n de edad


"+getEdad()+" \n ALUMNO EXELENTE! su calificacion fue: "+prom);
}
}
}

/**
* @return the ncontrol
*/
public int getNcontrol() {
return ncontrol;
}

/**
* @param ncontrol the ncontrol to set
*/
public void setNcontrol(int ncontrol) {
this.ncontrol = ncontrol;
}

/**
* @return the edad
*/
public int getEdad() {
return edad;
}

/**
* @param edad the edad to set
*/
public void setEdad(int edad) {
this.edad = edad;
}

/**
* @return the c1
*/
public int getC1() {
return c1;
}

/**
* @param c1 the c1 to set
*/
public void setC1(int c1) {
this.c1 = c1;
}

/**
* @return the c2
*/
public int getC2() {
return c2;
}

/**
* @param c2 the c2 to set
*/
public void setC2(int c2) {
this.c2 = c2;
}

/**
* @return the c3
*/
public int getC3() {
return c3;
}

/**
* @param c3 the c3 to set
*/
public void setC3(int c3) {
this.c3 = c3;
}

/**
* @return the c4
*/
public int getC4() {
return c4;
}

/**
* @param c4 the c4 to set
*/
public void setC4(int c4) {
this.c4 = c4;
}

/**
* @param nombre the nombre to set
*/
public void setNombre(String nombre) {
this.nombre = nombre;
}

/**
* @param sexo the sexo to set
*/
public void setSexo(String sexo) {
this.sexo = sexo;
}
}

You might also like