### Question:
NumarComplex { public double getReal() { return real; } NumarComplex();  NumarComplex(String nr); double getImg(); void setImg(double img); double getReal(); void setReal(double real); NumarComplex add(NumarComplex z); NumarComplex subtract(NumarComplex z); NumarComplex mul(NumarComplex z); NumarComplex div(NumarComplex z); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void getReal() { NumarComplex nr=new NumarComplex("3+i"); assertEquals(3d, nr.getReal(),0); }