/* An instance of this class, which is a child of ComplexNumber, ** represents a complex number. It augments its parent class by ** including a generator method for each of the four arithmetic ** operators. ** ** Authors: R. McCloskey and < Student's name > ** Date: Feb. 2022 ** Collaborated with: ... ** Known Defects: ... */ public class ComplexNumberWithGen extends ComplexNumber { // constructors // ------------ /* Establishes this complex number as being a + bi. */ public ComplexNumberWithGen(double a, double b) { // STUB } /* Establishes this complex number as being 0 + 0i. */ public ComplexNumberWithGen() { this(0.0, 0.0); } /* Establishes this complex number as being identical to the given one. */ public ComplexNumberWithGen(ComplexNumber c) { // STUB } // generators // ---------- /* Returns a new instance of this class corresponding to ** this + other, consistent with the rule that ** (a + bi) + (c + di) = (a+c) + (b+d)i. */ public ComplexNumberWithGen plus(ComplexNumber other) { return null; // STUB } /* Returns a new instance of this class corresponding to ** this - other, consistent with the rule that ** (a + bi) - (c + di) = (a-c) + (b-d)i. */ public ComplexNumberWithGen minus(ComplexNumber other) { return null; // STUB } /* Returns a new instance of this class corresponding to ** this * other, consistent with the rule that ** (a + bi) * (c + di) = (ac - bd) + (bc + ad)i. */ public ComplexNumberWithGen times(ComplexNumber other) { return null; // STUB } /* Returns a new instance of this class corresponding to ** this / other, consistent with the rule that ** (a + bi) / (c + di) = ** ((ac + bd) / (c^2 + d^2)) + ((bc - ad) / (c^2 + d^2))i. */ public ComplexNumberWithGen dividedBy(ComplexNumber other) { return null; // STUB } }