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^2==-1
Suppose we have two complex numbers, 1) re1+ lm1* l and 2) re2+ lm2* l, the addition of these numbers will look like (re1+ re2)+(lm1+ lm2)* 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 1234. you will dynamically feed two complex numbers, 1+2* l and 3+4* l, and then get 4+6* l as the output.
class ComplexNumber {
private int re;
private int lm;
//Constructor
public ComplexNumber(int r, int l){
}
//display a complex number
public void show(){
}
public static void main(String[]args){
}
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!