From 8e34a3bbc77eea0429f62b014091e7609c1915f0 Mon Sep 17 00:00:00 2001 From: henriquenicolli Date: Wed, 22 Aug 2018 20:51:25 -0300 Subject: [PATCH 1/2] teste passando --- src/main/java/br/utfpr/tdd/ex1/Aluno.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/br/utfpr/tdd/ex1/Aluno.java b/src/main/java/br/utfpr/tdd/ex1/Aluno.java index 63588d7..238d1a2 100644 --- a/src/main/java/br/utfpr/tdd/ex1/Aluno.java +++ b/src/main/java/br/utfpr/tdd/ex1/Aluno.java @@ -42,10 +42,15 @@ void setNotaProjeto(double nota) { } double getNF() { - if(notaRAA < 0) + if (notaRAA < 0) { return (notaProjeto + getNAP()) / 2.0; - - return (notaProjeto + getNAP() + notaRAA) / 3.0; + } + double nota = (notaProjeto + getNAP() + notaRAA) / 3.0; + if (nota > 6) { + return 6; + } else { + return nota; + } } void setNotaRAA(double nota) { From c87e04f9f0a3c63dbefd5061588359f587c755c1 Mon Sep 17 00:00:00 2001 From: henriquenicolli Date: Wed, 22 Aug 2018 20:55:34 -0300 Subject: [PATCH 2/2] teste passando --- src/test/java/br/utfpr/tdd/ex1/AlunoTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/java/br/utfpr/tdd/ex1/AlunoTest.java b/src/test/java/br/utfpr/tdd/ex1/AlunoTest.java index a500ac5..4225a2c 100644 --- a/src/test/java/br/utfpr/tdd/ex1/AlunoTest.java +++ b/src/test/java/br/utfpr/tdd/ex1/AlunoTest.java @@ -9,6 +9,7 @@ * @author andreendo */ public class AlunoTest { + //funcionando @Test public void testNotaAtividadesTresNotas() {