diff --git a/src/main/java/br/utfpr/tdd/ex1/Aluno.java b/src/main/java/br/utfpr/tdd/ex1/Aluno.java index 63588d7..2348551 100644 --- a/src/main/java/br/utfpr/tdd/ex1/Aluno.java +++ b/src/main/java/br/utfpr/tdd/ex1/Aluno.java @@ -42,10 +42,16 @@ void setNotaProjeto(double nota) { } double getNF() { + double res = 0; if(notaRAA < 0) - return (notaProjeto + getNAP()) / 2.0; + res = (notaProjeto + getNAP()) / 2.0; - return (notaProjeto + getNAP() + notaRAA) / 3.0; + res = (notaProjeto + getNAP() + notaRAA) / 3.0; + + if(res > 6){ + res = 6; + } + return res; } void setNotaRAA(double nota) {