Question: java languagw modify this class by taking out most of the previous methods and adding couple of methods as outlined below. RecComplexNum -real: double -imaginary:
modify this class by taking out most of the previous methods and adding couple of methods as outlined below. RecComplexNum -real: double -imaginary: double +RecComplexNum() +RecComplexNum (re: double, im: double) +getPolarFromRec():PolarComplexNum +displayRecForm():void Specifications of the RecComplexNum Class: The constructor without argument will assign all field values to zero. The constructor with parameter should accept the real and imaginary values as arguments, and assign these values to the fields real and imaginary. The getPolar From Reco) helper method will return the polar form of a RecComplexNum Object, as a PolarComplexNum object (you need to create this class in next-step). Inside this method the magnitude and angle of a PolarComplexNum Object will be calculated as follows: o Magnitude of a complex number a+bi - Va? + b2 - here you are required to use your MyMethod.myPow() method (you just created) and Math.sqrt() method. The angle of a complex number is a+bi - tan-? . Here you will use Math's atun(x) and toDegrees(x) methods o Once donc, you will instantiate a PolarComplexNum object with these two values (magnitude and angle) and return it. The display RecForm() method will print the RecComplexNum Object with its real and imaginary parts (see the sample-output for an idea)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
