create a class called complex for performing arithmetic with com
create a class called complex for performing arithmetic with complex numbers. complex numbers have the formrealpart + imaginarypart * iwhere i is√–1write a program to test your class. use floating-point variables to represent the private data of the class. provide a constructor that enables an object of this class to be initialized when it’s declared. provide a no-argument constructor with default values in case no initializers are provided. provide public methods that perform the following operations:a) add two complex numbers: the real parts are added together and the imaginary parts are added together.b) subtract two complex numbers: the real part of the right operand is subtracted from the real part of the left operand, and the imaginary part of the right operand is subtracted from the imaginary part of the left operand.c) print complex numbers in the form (realpart, imageinarypart).
Price Type: Negotiable
Total Proposals: 3
1 Current viewersl
21 Total views