/ComplexNumGen

A complex number generator implemented in Java 13, complete with JUnit tests and Javadoc comments. Includes an invariant as well as pre- and post-conditions.

Primary LanguageJava

ComplexNumGen

A complex number generator implemented in Java 13, complete with JUnit tests and Javadoc comments. Includes an invariant as well as pre- and post-conditions.

Each complex number is represented as an immutable object of class Complex. Objects are constructed with two numbers of type Double, the real number and the imaginary number. \

Complex numbers can be subject to addition, subtraction, multiplication, and division. Two complex numbers may also be checked to see if both are equal to one another. Each of these operations are showcased in the JUnit tests of TestComplex.java.