Create a class called Complex for performing arithmetic with complex numbers. Complex numbers have the form real
Fantastic news! We've Found the answer you've been seeking!
Question:
Create a class called Complex for performing arithmetic with complex numbers. Complex numbers have the form real + i imag, where i = v-1. Use floating point variables to represent the private data of the class. Provide a constructor to initialize a complex number when it is declared. The constructor should contain the default values in case no initializing values are provided.
Provide public member functions to perform the following operations:
· Addition of two Complex numbers
· Subtraction of two Complex numbers
· Multiplication of two Complex numbers
· Printing of a Complex number in a+ib format
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date: