public class PrinAluno {
public static void main(String[] args) {
Aluno alu = new Aluno();
alu.setAluno("Levi Lima Santana");
alu.setNota(45);
alu.setTrimestre(3);
System.out.println("O aluno " + alu.getAluno() + " tirou ao final do trimestre o total de " + alu.getNota() + " Pontos dividido pelo trimestre teve o total de " + alu.getTrimestre() + " pontos em cada trimestre!");
}
}
public class Aluno {
private String aluno; private int nota;
private int trimestre;
public void setAluno(String aluno) {
this.aluno = aluno;
}
public void setNota(int nota) {
this.nota = nota;
}
public void setTrimestre(int trimestre) {
this.trimestre = trimestre;
}
public int getNota() {
return nota;
}
public String getAluno() {
return aluno;
}
public int getTrimestre() {
return nota / trimestre;
}
}
glr fiz dessa forma serve tambem? tem o mesmo sentido do que foi apresentado?