diff --git a/src/universidade/Estudante.java b/src/universidade/Estudante.java new file mode 100644 index 0000000..b49a455 --- /dev/null +++ b/src/universidade/Estudante.java @@ -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; + } + + + + + +} \ No newline at end of file