Question: use c++ All the questions are interlinked to one another. Please solve all the questions separately as given. Please use c++ language (20 pts.) 1.

 use c++ All the questions are interlinked to one another. Pleaseuse c++

All the questions are interlinked to one another.

Please solve all the questions separately as given. Please use c++ language

(20 pts.) 1. Define a class called Complex that will hold a real number and an ima gi ite protot a) default constructor b) overloaded constructor c) an overloaded + operator as a class member function d) an overloaded - operator as a class member function e) an overloaded cin function and types for the following member functions with labels for whic that will accept the real and imaginary parts of the number an overloaded cout function. (7 pts.) 2. Write code segments that will call all of the functions defined in #1. Label which function is being called. Make sure the code would compile. (30 pts.) 3. Using the class Complex defined in #1, write code outside the class definition for the following functions. Label the functions with the problem being coded. a) default constructor that sets real and imaginary to 0. b) overloaded constructor that will accept the real an imaginary parts of the number Use an intialization section to initialize the values. c) overloaded + operator and d) the overloaded cout function that prints the complex number as (a + bi) where a is the real portion and b is the imaginary part

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!