Skip to content
Open

1 #45

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
15 changes: 11 additions & 4 deletions src/main/java/br/utfpr/tdd/ex1/Aluno.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class Aluno {
private int faltas;
private String ra;
private String nome;
double notafinal = 0.0;

public Aluno(String ra, String nome) {
this.ra = ra;
Expand Down Expand Up @@ -42,10 +43,16 @@ void setNotaProjeto(double nota) {
}

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

return (notaProjeto + getNAP() + notaRAA) / 3.0;
notafinal = (notaProjeto + getNAP() + notaRAA) / 3.0;

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

void setNotaRAA(double nota) {
Expand Down