Skip to content

Commit

Permalink
estuda javacod kk
Browse files Browse the repository at this point in the history
  • Loading branch information
Fujissaka committed Jul 22, 2024
1 parent c292944 commit 30d0d83
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions src/universidade/Estudante.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package universidade;

/**
* Modelo de estudante de graduação da UFABC
*/
public class Estudante {
private String nome;
private String ra;
private double[] notas;

/**
* constroi um novo estudante.
*
* @param nome O nome completo do estudante
* @param ra O no formato UFABC
* @param notas as notas obtidas (de 0 a 10)
*/
public Estudante( String nome, String ra, double[] notas) {
this.nome = nome;
this.ra = ra;
this.notas = notas;
}

private void validaRa(String ra) {
if (!ra.matches("\\d(11)")) {
throw new IllegalArgumentException("RA fora do formato");
}
}

public String getNome() {
return nome;
}





}

0 comments on commit 30d0d83

Please sign in to comment.