144,531 views
45 votes
45 votes
Write a class of complex numbers consisting of:

-Properties:
• Real part of type double;
• Virtual part of type double.
- Method:
• default constructor, 2-parameter constructor;
• Full setter, getter for each variable;
• the print() function prints SoPhuc as a string in the format a + bi, where a is the real part, b is the imaginary part
-Write main() function:
• Create 2 SoPhuc objects
• Use class methods to enter information for 2 objects
• Use print() method to print information of 2 objects that have been created

User Midnightnoir
by
3.2k points

1 Answer

17 votes
17 votes

Answer:

hi sorry for not knowing the answer

but please follow have a great day,night, or afternoon

User Shahidul
by
2.3k points