Hello, I just need a quick program for a beginning C++ class;
so I'm hoping someone out there could whip this out rather quickly and cheaply.
I don't know what the exact flavor of C++ we use, so please make sure that your code utilizes only the most standard headers & libraries.
I need a C++ program that does all of the following:
Design class Complex for working with complex numbers of the form a + bi, where i is the square root of -1. Your class must have two overloaded operators for adding and subtracting the complex numbers. The sum and the difference of two complex numbers a + bi and c + di is defined as (a+c) + (b+d)i (respectively, (a-c) + (b-d)i). The operators must throw exceptions in places where an integer overflow might occur. To check for an integer overflow, compare one of the numbers to add or subtract with the maximum (resp. minimum) integer representable in 4 bytes BEFORE the corresponding operation. Also, write a main method that demonstrates handling of the exceptions by printing warnings to the user.
Name the source file **[login to view URL]**
## Deliverables
1) Complete and fully-functional working program in C++ (.cpp extension); that includes the complete source code.
## Platform
this should be made for C++ running on a Linux server.
However, as long its in standard C++, I can compile it for our setup later.