The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 3 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
Redo (or do for the first time) Programming Project 9 from Chapter 11. Define your ADT class in separate files so that it can be compiled separately. Put the main function in its own file separate from the ADT files.
Programming Project 9 from Chapter 11
Define a class for complex numbers. A complex number is a number of the form
![]()
where, for our purposes, a and b are numbers of type double, and i is a number that represents the quantity −1. Represent a complex number as two values of type double. Name the member variables real and imaginary. (The variable for the number that is multiplied by i is the one called imaginary.) Call the class Complex
Include a constructor with two parameters of type double that can be used to set the member variables of an object to any values. Also include a constructor that has only a single parameter of type double; call this parameter real_part and define the constructor so that the object will be initialized to real_part+0*i. Also include a default constructor that initializes an object to 0 (that is, to 0+0*i). Overload all of the following operators so that they correctly apply to the type Complex: ==, +, -, *, >>, and

Â
Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â----------- Th-----------ank----------- Yo-----------u f-----------or -----------usi-----------ng -----------our----------- we-----------bsi-----------te -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill-----------