Skip to content

Update method multiply#10

Open
jeanmtang wants to merge 2 commits into
EphecLLN:masterfrom
jeanmtang:multiply
Open

Update method multiply#10
jeanmtang wants to merge 2 commits into
EphecLLN:masterfrom
jeanmtang:multiply

Conversation

@jeanmtang

Copy link
Copy Markdown

Update the multiply method

Update the multiply method
return denominator;
}
/** LEBAS Yaël
/** LEBAS Yaël

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.

Ne concerne pas ta méthode, sors cette modification de ton commit

Comment on lines 122 to 125
public Fraction multiply(Fraction f) {
this.numerator *= f.getNumerator();
this.denominator *= f.getDenominator();
return null;

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.

Lis bien la spécification :

  • La méthode ne modifie pas la fraction courante, mais renvoie une nouvelle fraction qui est le produit des deux opérandes (ici, tu renvoies null)
  • La fraction résultant du calcul doit être simplifiée

Changed the logic of the function multiply
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