Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ target/

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
/nbproject/
7 changes: 6 additions & 1 deletion 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;
//private double notaAUX;

public Aluno(String ra, String nome) {
this.ra = ra;
Expand Down Expand Up @@ -45,7 +46,11 @@ void setNotaProjeto(double nota) {
if(notaRAA < 0)
return (notaProjeto + getNAP()) / 2.0;

return (notaProjeto + getNAP() + notaRAA) / 3.0;
else
notaRAA = (notaProjeto + getNAP() + notaRAA) / 3.0;
if(notaRAA >= 6.0)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acredito que você não possa alterar o valor de notaRAA, visto que esta é uma propriedade utilizada por outros métodos, talvez seja interessante criar uma variável auxiliar.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obrigado!

notaRAA = 6.0;
return notaRAA;
}

void setNotaRAA(double nota) {
Expand Down