
This project is an introduction to C++ and its object-oriented features, specifically focusing on the creation and manipulation of a Complex class to handle complex numbers. The program demonstrates basic class functionalities, including a default constructor, member functions to print the complex number in a formatted manner, and setter and getter methods to modify and retrieve the real and imaginary parts of the number. The main function provides a series of tests to verify the correctness of these functionalities, ensuring that the Complex class operates as expected.
The coding for this project was done using emacs on my Mac Terminal.
The Complex class includes private data members for the real and imaginary parts, with member functions to set and get these values, as well as to print the complex number in a user-friendly format. This program serves as a foundational exercise in C++ for understanding class design, encapsulation, and basic input/output operations.
See my full code here at my GitHub Projects Respository.