From 6ea3c6c3ecb2af0b8c484b259256395a5d2c1d9a Mon Sep 17 00:00:00 2001 From: Lukas Reichwein Date: Tue, 16 Jul 2019 12:23:28 +0200 Subject: [PATCH] Object ComplexNumber created --- .../ugsbo/complexnumcalc/ComplexNumber.java | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/main/java/com/ugsbo/complexnumcalc/ComplexNumber.java diff --git a/src/main/java/com/ugsbo/complexnumcalc/ComplexNumber.java b/src/main/java/com/ugsbo/complexnumcalc/ComplexNumber.java new file mode 100644 index 0000000..dab8117 --- /dev/null +++ b/src/main/java/com/ugsbo/complexnumcalc/ComplexNumber.java @@ -0,0 +1,45 @@ +package com.ugsbo.complexnumcalc; + +public class ComplexNumber { + private int realPart; + private int imaginaryPart; + + /** + * @param realPart The real part of the complex Number + * @param imaginaryPart The imaginary part of the complex Number + */ + + public ComplexNumber(int realPart, int imaginaryPart) { + this.realPart = realPart; + this.imaginaryPart = imaginaryPart; + } + + /** + * @return the realPart + */ + public int getRealPart() { + return realPart; + } + + /** + * @param realPart the realPart to set + */ + public void setRealPart(int realPart) { + this.realPart = realPart; + } + + /** + * @return the imaginaryPart + */ + public int getImaginaryPart() { + return imaginaryPart; + } + + /** + * @param imaginaryPart the imaginaryPart to set + */ + public void setImaginaryPart(int imaginaryPart) { + this.imaginaryPart = imaginaryPart; + } + +} \ No newline at end of file