Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

java languagw image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design And Implementation

Authors: David M. Kroenke

5th Edition

B000CSIH5A, 978-0023668814

More Books

Students also viewed these Databases questions

Question

=+ Who do you think is right? Why?

Answered: 1 week ago