Question: a complex number can be represented on the form re + lm * l where: re is the real part lm is the
a complex number can be represented on the form re lm l where:
re is the real part
lm is the imaginary part
l
Suppose we have two complex numbers, re lm l and re lm l the addition of these numbers will look like re relm lm l Create a class that allows you to add two complex numbers based on the following skeleton. You are required to feed the complex numbers in the following way: java ComplexNumber you will dynamically feed two complex numbers, l and l and then get l as the output.
class ComplexNumber
private int re;
private int lm;
Constructor
public ComplexNumberint r int l
display a complex number
public void show
public static void mainStringargs
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
