/*  Notes on Scala for Java Programmers
    Scala ComplexNumbers Program

12345678901234567890123456789012345678901234567890123456789012345678901234567890

2019-01-28: Reconstructed from ScalaForJava.md notes source file
2019-02-01: Changed to use interpolated string
2022-04-25: Updated to be compatible with Scala 2 (procedures)

*/

class Complex(real: Double, imaginary: Double) {
    def re() = real
    def im() = imaginary
}

object ComplexNumbers {
    def main(args: Array[String]): Unit = {
        val c = new Complex(1.2, 3.4)
        // println("imaginary part: " + c.im())
        println(s"imaginary part:  ${c.im()}")
    }
}

