Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions src/main/java/br/utfpr/tdd/ex1/Aluno.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
* @author andreendo
*/
public class Aluno {

private List<Double> notasAtividadesPraticas = new ArrayList<>();
private double notaProjeto;
private double notaRAA = -1;
private int faltas;
private String ra;
private String ra;
private String nome;

public Aluno(String ra, String nome) {
this.ra = ra;
this.nome = nome;
Expand All @@ -26,14 +26,15 @@ public void addNotaAtividadePratica(double nota) {
}

public double getNAP() {
if(notasAtividadesPraticas.isEmpty())
if (notasAtividadesPraticas.isEmpty()) {
return 0.0;

double nap = 0;
}

double nap = 0;
for (Double nota : notasAtividadesPraticas) {
nap += nota;
}

return nap / notasAtividadesPraticas.size();
}

Expand All @@ -42,10 +43,14 @@ void setNotaProjeto(double nota) {
}

double getNF() {
if(notaRAA < 0)
if (notaRAA < 0) {
return (notaProjeto + getNAP()) / 2.0;

}
if ((notaProjeto + getNAP() + notaRAA) / 3.0 >= 6.0) {
return 6.0;
}
return (notaProjeto + getNAP() + notaRAA) / 3.0;

}

void setNotaRAA(double nota) {
Expand Down Expand Up @@ -79,5 +84,5 @@ public double getNotaProjeto() {
public double getNotaRAA() {
return notaRAA;
}

}