package vraag3; public class Breuk { private int teller, noemer; public Breuk(int t, int n) { teller = t; noemer = n; } public void optellen(Breuk other) { teller = this.teller*other.noemer + other.teller*this.noemer; noemer = this.noemer*other.noemer; } public String toString() { return teller+"/"+noemer; } }