Commit f2a76a88 authored by cosmina.dunca's avatar cosmina.dunca

firstTest

parent a0e97bce
No preview for this file type
No preview for this file type
No preview for this file type
File added
public class App {
public static void main(String[] args) throws Exception {
System.out.println("Hello, World!");
Complex a = new Complex(4.2, 5.7);
a.imag();
a.real();
}
}
......@@ -9,27 +9,26 @@ public class Complex {
imag = 0;
}
public Complex(double r, double i)
{
this.real = r;
this.imag = i;
double d = Math.atan2(i,r);
//double d = Math.atan2(i,r);
}
public double imag1()
public double imag()
{
return this.imag;
}
public double real1()
public double real()
{
return this.real;
}
public double magnitude()
{
return Math.sqrt(Math.pow(this.real, 2) + Math.pow(imag, 2));
return Math.sqrt(Math.pow(this.real, 2) + Math.pow(this.imag, 2));
}
public double argument()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment