Skip to content
Open
Changes from all commits
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
4 changes: 3 additions & 1 deletion src/main/java/tp/Fraction.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ public String asMixedNumber() {
* @return a new fraction which is the sum of f and the current fraction, in its reduced form.
*/
public Fraction add(Fraction f) {
return null;
float fraction;
fraction = (f.numerator/f.denominator) + (this.numerator/this.denominator);
return fraction;
}

/** PERDAENS Martin
Expand Down