Answered step by step
Verified Expert Solution
Question
1 Approved Answer
modify the class Complex to allow setting a complex number specified in modulus-argument form. This means that the complex number can be set by specifying
modify the class Complex to allow
setting a complex number specified in modulus-argument form. This means that the complex
number can be set by specifying the magnitude (modulus) of the complex number and the angle
(argument) which it makes relative to the x-axis. Hint: Create a function called
setModulusArgument which takes in the modulus and argument (argument should be in
radians) and then convert to a Cartesian complex (z=x+iy) format. Also create a new show
function which shows the complex number in modulus argument format (hint, create a function
called showModulusArgument). Modify and run the main program shown on Page 27 setting
z = 5 + 10i as an input and then output the result in modulus-argument format. Also run the
program using r=10 and =/3 and input and printing the Cartesian version of z. Setting the
inputs and writing the outputs can all be done by modifying main.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started