From 8a01125a685e6115ecedc48a26c234212584f789 Mon Sep 17 00:00:00 2001 From: jatemjeff Date: Wed, 22 Aug 2018 20:38:51 -0300 Subject: [PATCH] =?UTF-8?q?Atividade=2005=20Jefferson=20de=20Fran=C3=A7a?= =?UTF-8?q?=20Filho?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/br/utfpr/tdd/ex1/Aluno.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/br/utfpr/tdd/ex1/Aluno.java b/src/main/java/br/utfpr/tdd/ex1/Aluno.java index 63588d7..dfb6e1d 100644 --- a/src/main/java/br/utfpr/tdd/ex1/Aluno.java +++ b/src/main/java/br/utfpr/tdd/ex1/Aluno.java @@ -45,6 +45,9 @@ void setNotaProjeto(double nota) { if(notaRAA < 0) return (notaProjeto + getNAP()) / 2.0; + if((notaProjeto+getNAP()+notaRAA)/3.0 > 6) + return 6; + return (notaProjeto + getNAP() + notaRAA) / 3.0; }