Today we will learn how to build up complex concepts and models from simple parts.
Links:
GitHub Invitation URL: exercise11
Steps:
Clone the assignment for today after accepting the GitHub invitation at the link above.
Define and implement a class ComplexWidget
in complex_widget.hpp
and complex_widget.cpp
that derives from QWidget
and models a complex number. Include entry boxes of type QDoubleSpinBox
for the real and imaginary part and display boxes of type QLineEdit
for the magnitude and phase. The class should have public member functions getRealPart, getImaginaryPart, getMagnitude, and getPhase returning a double in each case.
Write a main function in main.cpp
that uses QApplication
to instantiate the ComplexWidget, show it, then enter the event loop.
Build and run your application using the CMakeLists.txt file included.
Now, use git to commit the modified source files to the local repository.
Finally, use git push to synchronize the repository with that on GitHub.
You have completed the Exercise.