Question: can someone help me write this program as a private member class, that is separated into a header & cpp files?? (9.14) using namespace std;
can someone help me write this program as a private member class, that is separated into a header & cpp files?? (9.14)

using namespace std; #include
class complex { int i,r; public: void read() { cout>r; cout>i; } void display() { cout>ch; switch(ch) { case 1: cout 9.14 (Complex Class) Create a class called Conplex for performing complex-number arithmetic Write a where i is J-1.Use double variables to represent the private data of the class. Provide a con tor chat enables an object of this class to be initialized when it's declared. T conain default valucs in case no initializers are provided. Provide public member functions tha perform the following tasks to test your class. Complex numbers have the form real Part + imagi naryPart . he constructor should a) Adding two Complex numbers: The real parts are added together and the imaginary parts are added together. Saberacting rwo 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 sub tracted from the imaginary part of the left operand. Printing Conplex numbers in the form (a, b, where a is the real part and b is the imag b) inary part 15 (atfonal Clan) Crate a class alld Rational for performing arith Wrise a program to test your class Use integer variables to repror inator. Proido
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
