Imaginary Numbers

This assignment was done in ICS212. The instructions were to create a complex class in C++ and learn how to make and implement classes in that language. Then we were told to add member functions to the class and test it ourselves to make sure everything worked.

I found this assignment to be particularly difficult because unlike ICS111 and ICS211 this was in a different language that included pointers and allows for overriding operators which is something we didn’t do in Java. We built many member functions that took in a Complex-number object and calculated addition, subtraction, multiplication, and division. We then overridden the operators so that we could use either and operator or a function to calculate our answers. During this assignment we were required to test everything to make sure it was all correct, but I found that most of my answers were wrong in the beginning. I found this to be one of the harder assignments of the semester and I learned a lot from taking this class.