I need to Write a class to store complex numbers and provide operations for the four basic arithmetic operations along with input and output operations. (You must have a class that has attributes of a real and an imaginary part. You would have 2 instances of this class for 2 complex numbers.) Use the time type project in your text to see help you with two class objects interacting.
Write a program to read two complex numbers and a symbol for one of these operations and to perform the indicated operations.
Allow your program to continue until the user decides to Quit.
I need to write this for a case study, but i dón't really understand complex numbers.
Thanks in advance
Here are the formulas. Any help would be greatly appreciated, guidance is what i'm looking for.
A complex number has the form a + bi, where a and b are real numbers and
i² = -1. The four basic arithmetic operations for complex numbers are defined as follows:
addition: (a + bi)+(c + di) = (a + c)+(b + d)i
subtraction: (a + bi)-(c + di) = (a - c)+(b - d)i
multiplication: (a + bi)*(c + di) = (ac – bd)+(ad + bc)i
division: a + bi = (ac + bd) + (bc – ad) i
c + di (c² + d²) (c² + d²)
provided both c and d do not equal zero