Skip to content

Instantly share code, notes, and snippets.

@seupedro
Last active January 17, 2018 22:03
Show Gist options
  • Save seupedro/b21756543a5fd48df541bf7136e87173 to your computer and use it in GitHub Desktop.
Save seupedro/b21756543a5fd48df541bf7136e87173 to your computer and use it in GitHub Desktop.
public class ReportCard {
//Defining variables
private String mMateria;
private double mNota;
//Constructor
public ReportCard( String materia, double nota){
mMateria = materia;
mNota = nota;
}
//Getter Methods
public String getMateria(){
return mMateria;
}
public double getNota(){
return mNota;
}
//Setter Methods
public void setMateria(String materia){
mMateria = materia;
}
public void setNota(double nota){
mNota = nota;
}
//toString Method
@Override
public String toString() {
return "Boletim do Aluno: " + "Matéria :" + mMateria + "Nota :" + mNota;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment