public class Driver { public static void main (String[] argv) { System.out.println("Complex class test\n"); // limit precision of double->String conversion to ensure // reproducability across platforms Double.setPrecision(10); /* Declare double and Complex values */ double d1 = 1; double d2 = 0; double d3 = -1.9; double d4 = 3.1; double d5 = 4.5e-90; double d6 = Double.NaN; Complex c1 = new Complex (1, 1); Complex c2 = new Complex (-5.1, 6.4); Complex c3 = new Complex (3.5, -1.5); Complex c4 = new Complex (-3.6, -7.6); Complex c5 = new Complex (3.1, 0); Complex c6 = new Complex (0, 2.4); Complex c7 = new Complex (-5.4, 0); Complex c8 = new Complex (0, -4.3); Complex c9 = new Complex (0, 0); Complex c10 = new Complex (-1, -1); Complex c11 = new Complex (-5.342e91, -2.3e-49); Complex c12 = new Complex (100, 1000); Complex c13 = new Complex (Double.NaN, 0.0); Complex c14 = new Complex (Double.NaN, Double.NaN); Complex c15 = new Complex (Double.NaN, Double.NaN); /* Print original double and Complex values */ System.out.println("Printing original values."); System.out.println("d1 = " + d1); System.out.println("d2 = " + d2); System.out.println("d3 = " + d3); System.out.println("d4 = " + d4); System.out.println("d5 = " + d5); System.out.println("d6 = " + d6); System.out.println("c1 = " + c1); System.out.println("c2 = " + c2); System.out.println("c3 = " + c3); System.out.println("c4 = " + c4); System.out.println("c5 = " + c5); System.out.println("c6 = " + c6); System.out.println("c7 = " + c7); System.out.println("c8 = " + c8); System.out.println("c9 = " + c9); System.out.println("c10 = " + c10); System.out.println("c11 = " + c11); System.out.println("c13 = " + c13); System.out.println("c14 = " + c14); System.out.println("c15 = " + c15); System.out.println(); /* parseComplex() test */ System.out.println("parseComplex() test"); // acceptable strings String as1 = "+7"; String as2 = "-4"; String as3 = "1.0"; String as4 = "-3.5"; String as5 = "14i"; String as6 = "-89i"; String as7 = "2.3i"; String as8 = "-4.5 i"; String as9 = "+4.2 + 12.3i"; String as10 = "-1.9 + 9.3 i"; String as11 = "-11 - 0.003i"; String as12 = "-1.9 + 9.3 i"; String as13 = "+4.321e82 - 2.43e-60i"; String as14 = "(1,1)"; String as15 = "( +2, -7.3)"; String as16 = "(-0.02, +4.5 )"; String as17 = "( -34.02, -4.5 )"; String as18 = "( -3.2e8, 4.3e7)"; System.out.println(as1 + " = " + (Complex.parseComplex(as1)).toString()); System.out.println(as2 + " = " + (Complex.parseComplex(as2)).toString()); System.out.println(as3 + " = " + (Complex.parseComplex(as3)).toString()); System.out.println(as4 + " = " + (Complex.parseComplex(as4)).toString()); System.out.println(as5 + " = " + (Complex.parseComplex(as5)).toString()); System.out.println(as6 + " = " + (Complex.parseComplex(as6)).toString()); System.out.println(as7 + " = " + (Complex.parseComplex(as7)).toString()); System.out.println(as8 + " = " + (Complex.parseComplex(as8)).toString()); System.out.println(as9 + " = " + (Complex.parseComplex(as9)).toString()); System.out.println(as10 + " = " + (Complex.parseComplex(as10)).toString()); System.out.println(as11 + " = " + (Complex.parseComplex(as11)).toString()); System.out.println(as12 + " = " + (Complex.parseComplex(as12)).toString()); System.out.println(as13 + " = " + (Complex.parseComplex(as13)).toString()); System.out.println(as14 + " = " + (Complex.parseComplex(as14)).toString()); System.out.println(as15 + " = " + (Complex.parseComplex(as15)).toString()); System.out.println(as16 + " = " + (Complex.parseComplex(as16)).toString()); System.out.println(as17 + " = " + (Complex.parseComplex(as17)).toString()); System.out.println(as18 + " = " + (Complex.parseComplex(as18)).toString()); // unacceptable strings String us1 = null; String us2 = ""; String us3 = "-13i-14.0"; String us4 = "32-6.5i+3"; String us5 = "()"; String us6 = "(-6)"; try { System.out.println("[null pointer] = " + (Complex.parseComplex(us1)).toString()); } catch (NullPointerException e) { System.out.println("[null pointer] caused a NullPointerException"); } try { System.out.println("[empty string] = " + (Complex.parseComplex(us2)).toString()); } catch (NumberFormatException e) { System.out.println("[empty string] caused a NumberFormatException"); } try { System.out.println(us3 + " = " + (Complex.parseComplex(us3)).toString()); } catch (NumberFormatException e) { System.out.println(us3 + " caused a NumberFormatException"); } try { System.out.println(us4 + " = " + (Complex.parseComplex(us4)).toString()); } catch (NumberFormatException e) { System.out.println(us4 + " caused a NumberFormatException"); } try { System.out.println(us5 + " = " + (Complex.parseComplex(us5)).toString()); } catch (NumberFormatException e) { System.out.println(us5 + " caused a NumberFormatException"); } try { System.out.println(us6 + " = " + (Complex.parseComplex(us6)).toString()); } catch (NumberFormatException e) { System.out.println(us6 + " caused a NumberFormatException"); } System.out.println(); /* Basic arithmetic test */ System.out.println("Basic Arithmetic"); System.out.println("-c1 = " + (-c1)); System.out.println("-c6 = " + (-c6)); System.out.println("-c9 = " + (-c9)); System.out.println(); System.out.println("c1 + d1 = " + (c1 + d1)); System.out.println("d1 + c1 = " + (d1 + c1)); System.out.println("c1 + c2 = " + (c1 + c2)); System.out.println("c11 + d5 = " + (c11 + d5)); System.out.println(); System.out.println("d1 + c1 = " + (d1 + c1)); System.out.println("c1 + c2 = " + (c1 + c2)); System.out.println("c11 + d5 = " + (c11 + d5)); System.out.println(); System.out.println("c12 = " + c12); System.out.println("c12 += d3;"); c12 += d3; System.out.println("c12 = " + c12); System.out.println(); System.out.println("c12 = " + c12); System.out.println("c12 += c1;"); c12 += c1; System.out.println("c12 = " + c12); System.out.println(); System.out.println("c1 - d1 = " + (c1 - d1)); System.out.println("d1 - c1 = " + (d1 - c1)); System.out.println("c1 - c2 = " + (c1 - c2)); System.out.println("d5 - c11 = " + (d5 - c11)); System.out.println(); System.out.println("c12 = " + c12); System.out.println("c12 -= d3;"); c12 -= d3; System.out.println("c12 = " + c12); System.out.println(); System.out.println("c12 = " + c12); System.out.println("c12 -= c1;"); c12 -= c1; System.out.println("c12 = " + c12); System.out.println(); System.out.println("c1 * d3 = " + (c1 * d3)); System.out.println("d3 * c1 = " + (d3 * c1)); System.out.println("c1 * c2 = " + (c1 * c2)); System.out.println("c11 * c11 = " + (c11 * c11)); System.out.println(); System.out.println("c12 = " + c12); System.out.println("c12 *= d3;"); c12 *= d3; System.out.println("c12 = " + c12); System.out.println(); System.out.println("c12 = " + c12); System.out.println("c12 *= c1;"); c12 *= c1; System.out.println("c12 = " + c12); System.out.println(); System.out.println("c1 / d3 = " + (c1 / d3)); System.out.println("d3 / c1 = " + (d3 / c1)); System.out.println("c1 / c2 = " + (c1 / c2)); System.out.println("d5 / c11 = " + (d5 / c11)); System.out.println(); System.out.println("c12 = " + c12); System.out.println("c12 /= d3;"); c12 /= d3; System.out.println("c12 = " + c12); System.out.println(); System.out.println("c12 = " + c12); System.out.println("c12 /= c1;"); c12 /= c1; System.out.println("c12 = " + c12); System.out.println(); // division by zero System.out.println("c1 / d2 = " + (c1 / d2)); System.out.println("c2 / d2 = " + (c2 / d2)); System.out.println("c3 / d2 = " + (c3 / d2)); System.out.println("c4 / d2 = " + (c4 / d2)); System.out.println("c5 / d2 = " + (c5 / d2)); System.out.println("c6 / d2 = " + (c6 / d2)); System.out.println("c7 / d2 = " + (c7 / d2)); System.out.println("c8 / d2 = " + (c8 / d2)); System.out.println("c9 / d2 = " + (c9 / d2)); System.out.println("c10 / d2 = " + (c10 / d2)); System.out.println("c11 / d2 = " + (c11 / d2)); System.out.println(); System.out.println("d1 / c9 = " + (d1 / c9)); System.out.println("d2 / c9 = " + (d2 / c9)); System.out.println("d3 / c9 = " + (d3 / c9)); System.out.println("d4 / c9 = " + (d4 / c9)); System.out.println("d5 / c9 = " + (d5 / c9)); System.out.println(); System.out.println("c1 / c9 = " + (c1 / c9)); System.out.println("c2 / c9 = " + (c2 / c9)); System.out.println("c3 / c9 = " + (c3 / c9)); System.out.println("c4 / c9 = " + (c4 / c9)); System.out.println("c5 / c9 = " + (c5 / c9)); System.out.println("c6 / c9 = " + (c6 / c9)); System.out.println("c7 / c9 = " + (c7 / c9)); System.out.println("c8 / c9 = " + (c8 / c9)); System.out.println("c9 / c9 = " + (c9 / c9)); System.out.println("c10 / c9 = " + (c10 / c9)); System.out.println("c11 / c9 = " + (c11 / c9)); System.out.println(); /* Equality / inequality test */ System.out.println("Equality / Inequality"); // testing equality with non-NaN's System.out.println("d1 == c1 is " + (d1 == c1)); System.out.println("c1 == d1 is " + (c1 == d1)); System.out.println("c5 == d4 is " + (c5 == d4)); System.out.println("d4 == c5 is " + (d4 == c5)); System.out.println("d1 != c1 is " + (d1 != c1)); System.out.println("c1 != d1 is " + (c1 != d1)); System.out.println("c1 == (-c10) is " + (c1 == (-c10))); System.out.println("c1 != (-c10) is " + (c1 != (-c10))); System.out.println("c1 == c2 is " + (c1 == c2)); System.out.println("c1 != c2 is " + (c1 != c2)); System.out.println(); // testing equality with NaN's System.out.println("d6 == c13 is " + (d6 == c13)); System.out.println("c14 == c15 is " + (c14 == c15)); System.out.println("d6 != c13 is " + (d6 != c13)); System.out.println("c14 != c15 is " + (c14 != c15)); System.out.println(); /* Complex conjugate test */ System.out.println("Complex Conjugate"); System.out.println("~c1 = " + ~c1); System.out.println("c1.conj() = " + c1.conj()); System.out.println("~c5 = " + ~c5); System.out.println("c5.conj() = " + c5.conj()); System.out.println("~c9 = " + ~c9); System.out.println("c9.conj() = " + c9.conj()); System.out.println(); /* Exponentiation / logarithms test */ System.out.println("Exponentiation / Logarithms"); // raising to a power System.out.println("c2^d1 = " + (c2^d1)); System.out.println("d1^c2 = " + (d1^c2)); System.out.println("c2^c4 = " + (c2^c4)); System.out.println("c5^d2 = " + (c5^d2)); System.out.println("d2^c5 = " + (d2^c5)); System.out.println("c5^c4 = " + (c5^c4)); System.out.println("c2^d4 = " + (c2^d4)); System.out.println("d4^c2 = " + (d4^c2)); System.out.println("c2^c4 = " + (c2^c4)); System.out.println("c9^d4 = " + (c9^d4)); System.out.println("d4^c9 = " + (d4^c9)); System.out.println("c9^c4 = " + (c9^c4)); System.out.println("c9^d2 = " + (c9^d2)); System.out.println("c9^c9 = " + (c9^c9)); System.out.println("c11^c3 = " + (c11^c3)); System.out.println(); System.out.println("c12 = " + c12); System.out.println("c12 ^= d4;"); c12 ^= d4; System.out.println("c12 = " + c12); System.out.println("c12 ^= (1/d4);"); c12 ^= (1/d4); System.out.println("c12 = " + c12); System.out.println(); System.out.println("c12 = " + c12); System.out.println("c12 ^= c1;"); c12 ^= c1; System.out.println("c12 = " + c12); System.out.println("c12 ^= (1/c1);"); c12 ^= (1/c1); System.out.println("c12 = " + c12); System.out.println(); // exp System.out.println("c1.exp() = " + c1.exp()); System.out.println("c2.exp() = " + c2.exp()); System.out.println("c3.exp() = " + c3.exp()); System.out.println("c4.exp() = " + c4.exp()); System.out.println("c5.exp() = " + c5.exp()); System.out.println("c6.exp() = " + c6.exp()); System.out.println("c7.exp() = " + c7.exp()); System.out.println("c8.exp() = " + c8.exp()); System.out.println("c9.exp() = " + c9.exp()); System.out.println("c10.exp() = " + c10.exp()); System.out.println("c11.exp() = " + c11.exp()); System.out.println(); // log System.out.println("c1.log() = " + c1.log()); System.out.println("c2.log() = " + c2.log()); System.out.println("c3.log() = " + c3.log()); System.out.println("c4.log() = " + c4.log()); System.out.println("c5.log() = " + c5.log()); System.out.println("c6.log() = " + c6.log()); System.out.println("c7.log() = " + c7.log()); System.out.println("c8.log() = " + c8.log()); System.out.println("c9.log() = " + c9.log()); System.out.println("c10.log() = " + c10.log()); System.out.println("c11.log() = " + c11.log()); System.out.println(); // exp and log System.out.println("c1.exp().log() = " + c1.exp().log()); System.out.println("c1.log().exp() = " + c1.log().exp()); System.out.println("c2.exp().log() = " + c2.exp().log()); System.out.println("c2.log().exp() = " + c2.log().exp()); System.out.println("c9.exp().log() = " + c9.exp().log()); System.out.println("c9.log().exp() = " + c9.log().exp()); System.out.println("c11.exp().log() = " + c11.exp().log()); //System.out.println("c11.log().exp() = " + c11.log().exp()); // prevent false negatives System.out.println(); // taking the square root System.out.println("c1.sqrt() = " + c1.sqrt()); System.out.println("c2.sqrt() = " + c2.sqrt()); System.out.println("c3.sqrt() = " + c3.sqrt()); System.out.println("c4.sqrt() = " + c4.sqrt()); System.out.println("c5.sqrt() = " + c5.sqrt()); System.out.println("c6.sqrt() = " + c6.sqrt()); System.out.println("c7.sqrt() = " + c7.sqrt()); System.out.println("c8.sqrt() = " + c8.sqrt()); System.out.println("c9.sqrt() = " + c9.sqrt()); System.out.println("c10.sqrt() = " + c10.sqrt()); System.out.println("c11.sqrt() = " + c11.sqrt()); System.out.println(); /* Trigonometric Functions */ // sine System.out.println("c1.sin() = " + c1.sin()); System.out.println("c2.sin() = " + c2.sin()); System.out.println("c3.sin() = " + c3.sin()); System.out.println("c4.sin() = " + c4.sin()); System.out.println("c5.sin() = " + c5.sin()); System.out.println("c6.sin() = " + c6.sin()); System.out.println("c7.sin() = " + c7.sin()); System.out.println("c8.sin() = " + c8.sin()); System.out.println("c9.sin() = " + c9.sin()); System.out.println("c10.sin() = " + c10.sin()); //System.out.println("c11.sin() = " + c11.sin()); // c11 huge => too unpredicatable System.out.println(); // cosine System.out.println("c1.cos() = " + c1.cos()); System.out.println("c2.cos() = " + c2.cos()); System.out.println("c3.cos() = " + c3.cos()); System.out.println("c4.cos() = " + c4.cos()); System.out.println("c5.cos() = " + c5.cos()); System.out.println("c6.cos() = " + c6.cos()); System.out.println("c7.cos() = " + c7.cos()); System.out.println("c8.cos() = " + c8.cos()); System.out.println("c9.cos() = " + c9.cos()); System.out.println("c10.cos() = " + c10.cos()); //System.out.println("c11.cos() = " + c11.cos()); // c11 huge => too unpredicatable System.out.println(); // tangent System.out.println("c1.tan() = " + c1.tan()); System.out.println("c2.tan() = " + c2.tan()); System.out.println("c3.tan() = " + c3.tan()); System.out.println("c4.tan() = " + c4.tan()); System.out.println("c5.tan() = " + c5.tan()); System.out.println("c6.tan() = " + c6.tan()); System.out.println("c7.tan() = " + c7.tan()); System.out.println("c8.tan() = " + c8.tan()); System.out.println("c9.tan() = " + c9.tan()); System.out.println("c10.tan() = " + c10.tan()); //System.out.println("c11.tan() = " + c11.tan()); // c11 huge => too unpredicatable System.out.println(); // arcsine System.out.println("c1.asin() = " + c1.asin()); System.out.println("c2.asin() = " + c2.asin()); System.out.println("c3.asin() = " + c3.asin()); System.out.println("c4.asin() = " + c4.asin()); System.out.println("c5.asin() = " + c5.asin()); System.out.println("c6.asin() = " + c6.asin()); System.out.println("c7.asin() = " + c7.asin()); System.out.println("c8.asin() = " + c8.asin()); System.out.println("c9.asin() = " + c9.asin()); System.out.println("c10.asin() = " + c10.asin()); System.out.println("c11.asin() = " + c11.asin()); System.out.println(); // arccosine System.out.println("c1.acos() = " + c1.acos()); System.out.println("c2.acos() = " + c2.acos()); System.out.println("c3.acos() = " + c3.acos()); System.out.println("c4.acos() = " + c4.acos()); System.out.println("c5.acos() = " + c5.acos()); System.out.println("c6.acos() = " + c6.acos()); System.out.println("c7.acos() = " + c7.acos()); System.out.println("c8.acos() = " + c8.acos()); System.out.println("c9.acos() = " + c9.acos()); System.out.println("c10.acos() = " + c10.acos()); System.out.println("c11.acos() = " + c11.acos()); System.out.println(); // arctangent System.out.println("c1.atan() = " + c1.atan()); System.out.println("c2.atan() = " + c2.atan()); System.out.println("c3.atan() = " + c3.atan()); System.out.println("c4.atan() = " + c4.atan()); System.out.println("c5.atan() = " + c5.atan()); System.out.println("c6.atan() = " + c6.atan()); System.out.println("c7.atan() = " + c7.atan()); System.out.println("c8.atan() = " + c8.atan()); System.out.println("c9.atan() = " + c9.atan()); System.out.println("c10.atan() = " + c10.atan()); System.out.println("c11.atan() = " + c11.atan()); System.out.println(); // hyperbolic sine System.out.println("c1.sinh() = " + c1.sinh()); System.out.println("c2.sinh() = " + c2.sinh()); System.out.println("c3.sinh() = " + c3.sinh()); System.out.println("c4.sinh() = " + c4.sinh()); System.out.println("c5.sinh() = " + c5.sinh()); System.out.println("c6.sinh() = " + c6.sinh()); System.out.println("c7.sinh() = " + c7.sinh()); System.out.println("c8.sinh() = " + c8.sinh()); System.out.println("c9.sinh() = " + c9.sinh()); System.out.println("c10.sinh() = " + c10.sinh()); System.out.println("c11.sinh() = " + c11.sinh()); System.out.println(); // hyperbolic cosine System.out.println("c1.cosh() = " + c1.cosh()); System.out.println("c2.cosh() = " + c2.cosh()); System.out.println("c3.cosh() = " + c3.cosh()); System.out.println("c4.cosh() = " + c4.cosh()); System.out.println("c5.cosh() = " + c5.cosh()); System.out.println("c6.cosh() = " + c6.cosh()); System.out.println("c7.cosh() = " + c7.cosh()); System.out.println("c8.cosh() = " + c8.cosh()); System.out.println("c9.cosh() = " + c9.cosh()); System.out.println("c10.cosh() = " + c10.cosh()); System.out.println("c11.cosh() = " + c11.cosh()); System.out.println(); // hyperbolic tangent System.out.println("c1.tanh() = " + c1.tanh()); System.out.println("c2.tanh() = " + c2.tanh()); System.out.println("c3.tanh() = " + c3.tanh()); System.out.println("c4.tanh() = " + c4.tanh()); System.out.println("c5.tanh() = " + c5.tanh()); System.out.println("c6.tanh() = " + c6.tanh()); System.out.println("c7.tanh() = " + c7.tanh()); System.out.println("c8.tanh() = " + c8.tanh()); System.out.println("c9.tanh() = " + c9.tanh()); System.out.println("c10.tanh() = " + c10.tanh()); System.out.println("c11.tanh() = " + c11.tanh()); System.out.println(); // hyperbolic arcsine System.out.println("c1.asinh() = " + c1.asinh()); System.out.println("c2.asinh() = " + c2.asinh()); System.out.println("c3.asinh() = " + c3.asinh()); System.out.println("c4.asinh() = " + c4.asinh()); System.out.println("c5.asinh() = " + c5.asinh()); System.out.println("c6.asinh() = " + c6.asinh()); System.out.println("c7.asinh() = " + c7.asinh()); System.out.println("c8.asinh() = " + c8.asinh()); System.out.println("c9.asinh() = " + c9.asinh()); System.out.println("c10.asinh() = " + c10.asinh()); System.out.println("c11.asinh() = " + c11.asinh()); System.out.println(); // hyperbolic arccosine System.out.println("c1.acosh() = " + c1.acosh()); System.out.println("c2.acosh() = " + c2.acosh()); System.out.println("c3.acosh() = " + c3.acosh()); System.out.println("c4.acosh() = " + c4.acosh()); System.out.println("c5.acosh() = " + c5.acosh()); System.out.println("c6.acosh() = " + c6.acosh()); System.out.println("c7.acosh() = " + c7.acosh()); System.out.println("c8.acosh() = " + c8.acosh()); System.out.println("c9.acosh() = " + c9.acosh()); System.out.println("c10.acosh() = " + c10.acosh()); System.out.println("c11.acosh() = " + c11.acosh()); System.out.println(); // hyperbolic arctangent System.out.println("c1.atanh() = " + c1.atanh()); System.out.println("c2.atanh() = " + c2.atanh()); System.out.println("c3.atanh() = " + c3.atanh()); System.out.println("c4.atanh() = " + c4.atanh()); System.out.println("c5.atanh() = " + c5.atanh()); System.out.println("c6.atanh() = " + c6.atanh()); System.out.println("c7.atanh() = " + c7.atanh()); //System.out.println("c8.atanh() = " + c8.atanh()); // prevent false negatives System.out.println("c9.atanh() = " + c9.atanh()); System.out.println("c10.atanh() = " + c10.atanh()); System.out.println("c11.atanh() = " + c11.atanh()); System.out.println(); /* Polar Conversion Methods */ // absolute value (magnitude) System.out.println("c1.abs() = " + c1.abs()); System.out.println("c2.abs() = " + c2.abs()); System.out.println("c3.abs() = " + c3.abs()); System.out.println("c4.abs() = " + c4.abs()); System.out.println("c5.abs() = " + c5.abs()); System.out.println("c6.abs() = " + c6.abs()); System.out.println("c7.abs() = " + c7.abs()); System.out.println("c8.abs() = " + c8.abs()); System.out.println("c9.abs() = " + c9.abs()); System.out.println("c10.abs() = " + c10.abs()); System.out.println("c11.abs() = " + c11.abs()); System.out.println(); // absolute value square System.out.println("c1.absSquare() = " + c1.absSquare()); System.out.println("c2.absSquare() = " + c2.absSquare()); System.out.println("c3.absSquare() = " + c3.absSquare()); System.out.println("c4.absSquare() = " + c4.absSquare()); System.out.println("c5.absSquare() = " + c5.absSquare()); System.out.println("c6.absSquare() = " + c6.absSquare()); System.out.println("c7.absSquare() = " + c7.absSquare()); System.out.println("c8.absSquare() = " + c8.absSquare()); System.out.println("c9.absSquare() = " + c9.absSquare()); System.out.println("c10.absSquare() = " + c10.absSquare()); System.out.println("c11.absSquare() = " + c11.absSquare()); System.out.println(); // argument (phase angle) System.out.println("c1.arg() = " + c1.arg()); System.out.println("c2.arg() = " + c2.arg()); System.out.println("c3.arg() = " + c3.arg()); System.out.println("c4.arg() = " + c4.arg()); System.out.println("c5.arg() = " + c5.arg()); System.out.println("c6.arg() = " + c6.arg()); System.out.println("c7.arg() = " + c7.arg()); System.out.println("c8.arg() = " + c8.arg()); System.out.println("c9.arg() = " + c9.arg()); System.out.println("c10.arg() = " + c10.arg()); System.out.println("c11.arg() = " + c11.arg()); System.out.println(); } }