Lab 9
Due: Tue, Apr 21 (now due Apr 28), 11:59 pm
For this lab you need to create a project composed of several files.
The file that contains the main function must have the content of the file "Lab9Main.cpp" EXACTLY (except that you should replace the namespace "aydin" with your lastname, and possibly change the names of the header files), located in the class folder (P:\Class\Math\Aydin\118\FilesForLabs). Copy that file to your folder.
Write other necessary files, create a namespace (having your last name) and combine them into a project (you can use either method we learned) so that you can run the main program and it produces a reasonable output.
Here are the other files you need to write:
An interface (header) file called complex.h for the complex number class (which contains a definition of the complex number class, but no implementations of the member functions or constructors)
An implementation file, complex.cpp, which contains implementations of the members of the complex number class.
An interface (header) file called Functions.h with prototypes of the following functions:
factorial function: int fact(int);
exponential function: double exp(double)
natural logarithmic function: double log(double)
trig functions sine and cosine: double sin(double) and double cos(double)
An implementation file for the functions, Functions.cpp, which contains definitions of the functions declared in the interface file. Use the formulas given in the class (also given here) to define these functions. Pay attention to the following: The factorial function is only defined for non-negative integers and the formula given for log function is only valid if the argument is positive but less than 2. If an argument different from these is given to these 2 functions, then an appropriate error message should be output.
All of these functions and ComplexNumber class must be a part of the namespace having your last name.
As usual, you will be graded on the following criteria: fulfillment of all requirements in problem statements, correct output, good user interface, good coding style and formatting. 100 pts.