public class Komplex
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private double |
im
Imaginaerteil einer komplexen Zahl.
|
private double |
re
Realteil einer komplexen Zahl.
|
Constructor and Description |
---|
Komplex() |
Modifier and Type | Method and Description |
---|---|
Komplex |
add(Komplex a)
Addition.
|
Komplex |
div(Komplex a)
Division.
|
double |
getIm()
Liest Imaginaerteil.
|
double |
getRe()
Liest Realteil.
|
static void |
main(java.lang.String[] args)
Testprogramm zu komplexe Zahlen.
|
Komplex |
mult(Komplex a)
Multiplikation.
|
boolean |
setKomplex(double real,
double imaginaer)
Setzt Real- und Imaginaerteil einer komplexen Zahl.
|
Komplex |
sub(Komplex a)
Subtraktion.
|
java.lang.String |
toString()
Darstellen einer komplexen Zahl.
|
private double re
private double im
public boolean setKomplex(double real, double imaginaer)
real
- Realteil der komplexen Zahlimaginaer
- Imaginaerteil der komplexen Zahlpublic double getRe()
public double getIm()
public java.lang.String toString()
toString
in class java.lang.Object
public Komplex mult(Komplex a)
a
- komplexe Zahlpublic static void main(java.lang.String[] args)