Challenge: Sum of Complex Numbers
Explore how to create a Kotlin class named Complex that holds real and imaginary values. Learn to implement a constructor with default parameters and a method to add two complex numbers, returning their sum.
We'll cover the following...
We'll cover the following...
Problem statement
Implement a class, Complex, that contains two properties, real and img, of the Double datatype. Also implement a member method, add(), ...