Question: In C++ Problem: here is the Complex number class created in class: #include using std::cout; using std::endl; using std::ostream; struct complex { complex(double re=0.0, double

In C++

Problem:

In C++ Problem: here is the Complex number class created in class:

here is the Complex number class created in class:

#include using std::cout; using std::endl; using std::ostream; struct complex { complex(double re=0.0, double im=0.0) : real(re), imag(im) {} const complex operator+(const complex &) const; const complex operator-(const complex &) const; const complex operator*(const complex &) const; const complex operator/(const complex &) const; const complex operator~(void) const; friend ostream &operator  Rational Numbers Create a Rational number class in the same style as the Complex number class created in class. That is, implement the following methods: constructor addition operator subtraction operator multiplication operator division operator stream insertion operator You must also provide a main function to fully test your Rational number class

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!