Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN C++ In lecture we went over the Rat class. Here the question is to write a Complex ( imaginary number ) class; using namespace

IN C++

In lecture we went over the Rat class. Here the question is to write a Complex ( imaginary number ) class;

using namespace std;

class Complex { private:

double r;

double i;

public:

Complex();

overloaded add function for Complex should return Complex

overloaded subtract function for Complex should return Complex

overloaded multiply function for Complex should return Complex

overloaded divide function for Complex should return Complex

get and set for both r and i

overloaded input and output functions for Complex };

for the definitions of the arithmetic functions see here:

http://en.wikipedia.org/wiki/Complex_number#Addition_and_subtractio

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

3rd Edition

0471418455, 978-0471418450

More Books

Students also viewed these Databases questions