MCPcopy Create free account
hub / github.com/PrajaktaSathe/Java / plus

Method plus

Programs/ADTFractionApp.java:58–64  ·  view source on GitHub ↗
(ADTFraction x)

Source from the content-addressed store, hash-verified

56
57//---------------------------------------------------
58 public ADTFraction plus(ADTFraction x) {//add two fractions this=3/5 x=7/8
59 int num, den;
60 den=this.d * x.d;
61 num=this.n * x.d + x.n * this.d;
62 ADTFraction f1 = new ADTFraction(num,den);
63 return f1;
64 }
65
66
67//---------------------------------------------------

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected