Skip to content

Issue 2 : Implémentation de la methode reduce()#22

Open
HumbertMeyers wants to merge 4 commits into
EphecLLN:testfrom
HumbertMeyers:master
Open

Issue 2 : Implémentation de la methode reduce()#22
HumbertMeyers wants to merge 4 commits into
EphecLLN:testfrom
HumbertMeyers:master

Conversation

@HumbertMeyers

Copy link
Copy Markdown

No description provided.

Comment thread src/main/java/tp/Fraction.java Outdated
Comment on lines +31 to +42
this.numerator = numerator;
this.denominator = denominator;

try {
if(denominator != 0) {
double answer = numerator / denominator;
System.out.println(answer);
}
} catch (Exception e) {
System.out.println("Denominator can't be 0");
}

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.

ceci est un test pour la methode reduce(). Si possible ne pas prendre en compte cette modification

Retrait du code de test
Non pris en compte

@vvandenschrieck vvandenschrieck left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Algorithme à revoir!

*/
private void reduce() {
if(this.numerator % this.denominator == 0) {
Fraction(this.numerator, this.denominator);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Cette ligne ne fait rien!

if(this.numerator % this.denominator == 0) {
Fraction(this.numerator, this.denominator);
}else {
int gcd = Fraction(this.denominator, this.numerator % this.denominator);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Comment est-ce qu'un appel de constructeur pourrait renvoyer un int? Et pourquoi faire un appel de constructeur?

@vvandenschrieck vvandenschrieck changed the base branch from master to test October 25, 2019 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants