Commit 8de80543 authored by a-j.towse's avatar a-j.towse

All test passed

parent 7bb37aed
No preview for this file type
...@@ -56,8 +56,9 @@ public class Complex { ...@@ -56,8 +56,9 @@ public class Complex {
public Complex add(Complex complexNum) public Complex add(Complex complexNum)
{ {
Complex answer = new Complex(0.0,0.0); Double ansreal = complexNum.real + real;
Double ansimag = complexNum.imag + imag;
Complex answer = new Complex(ansreal,ansimag);
return answer; return answer;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment