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

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

Step by Step Solution

3.34 Rating (151 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Solution include include using namespace std class complex float real float imag p... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!