Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 683 Bytes

File metadata and controls

12 lines (9 loc) · 683 Bytes

Complex Numbers - Operator Overloading

Operator overloading concepts in OOP.

Problem Statement

Design a class of Complex Number having default, overloaded and copy constructors. Define all setter and getter functions. Also perform operator overloading as follows:

  • Overload the addition, subtraction, multiplication and division operators for this class.
  • Overload the equality and non-equality operators for this class.
  • Overload the unary operators such as negation, conjugate, pre & post increment/decrement
  • Write the function operator to convert Complex number to double type.
  • Write a type conversion constructor to convert a string into Complex number.