Los virus
Promedio de tres calificaciones decir si aprueba o reprueba
-------------------------------------------------
/*VELAZQUEZ BRETON MORA RAUL-------------------------------------------------
* Grupo 5102
-------------------------------------------------
* PROBLEMA 15: Calcular el promedio de 2 numeros
-------------------------------------------------
*/-------------------------------------------------
package problema15;
-------------------------------------------------
-------------------------------------------------
public class PromedioCalificaciones {-------------------------------------------------
-------------------------------------------------
private double c, b, a, d;
-------------------------------------------------
privatedouble e;
-------------------------------------------------
-------------------------------------------------
public PromedioCalificaciones (int a, int b, int c) {-------------------------------------------------
-------------------------------------------------
this.a = a;
-------------------------------------------------
this.b = b;-------------------------------------------------
this.c = c;
-------------------------------------------------
}
-------------------------------------------------
-------------------------------------------------private void operacion() {
-------------------------------------------------
this.d = (this.a + this.b + this.c) / 3;
-------------------------------------------------
}-------------------------------------------------
-------------------------------------------------
public void imprimir() {
-------------------------------------------------
operacion();-------------------------------------------------
System.out.println("Tu calificacion es: " + this.d);
-------------------------------------------------
if (this.d >= 7) {...
Regístrate para leer el documento completo.