Question: Please USE C++ In this program you will write a class that is designed to combine the concepts of integer fractions and complex numbers. Remember

 Please USE C++ In this program you will write a classthat is designed to combine the concepts of integer fractions and complexnumbers. Remember from math class that a fraction is number written inthe form where a and b are not reducible. is acceptable whereasis not because it can be reduced by a power of two.However we are also going to augment that with the idea of

Please USE C++

In this program you will write a class that is designed to combine the concepts of integer fractions and complex numbers. Remember from math class that a fraction is number written in the form where a and b are not reducible. is acceptable whereas is not because it can be reduced by a power of two. However we are also going to augment that with the idea of a complex number. Remember that the complex numbers are a joint number consisting of a real part (a) and an imaginary part (6 * i) where i is the imaginary number -1. Your class will implement the Fractional Complex number class, and allow for the class to implement the necessary overloaded functions and operators. You will be provided a main program that is designed to test your class, and make sure that each part is working as indicated. Note that if you need help with the math involved, tips will be provided at the end, but feel free to get help from a math instructor or from your computer science instructor. THE MAIN PROGRAM. Your main program will be provided for you. It will be broken into pieces that allow you to get parts of your program up and running in small sections without having to get the entire thing working at once. You are not to modify the main program code as a norm, but sections of it are commented out. It will be important for you to uncomment these sections as you get parts of your code working. THE FRACTIONALCOMPLEX CLASS The primary work that you will be doing is creating the Fractional Complex class and its associated methods. You will be expected to implement all of the methods below, but as always, you are welcome to add additional methods if you want / need them to help you out. Your class should only use int values, as the point of the class is to do things with fractions. A Fractional Complex number will be represented by 4 integer values, a, b, c, and d. The format of the number will be . + Note that you should not have to keep track of the (i) as that will be in the code. At all times should be kept in reduced form as should + is acceptable, but sti is not because is not reduced. If at any time one of the numbers is zero, represent it by the number, som ti is acceptable. Make sure that the denominators (b,d) are never zero. If they become zero in the constructor or by work, then make the value by default. Note that these are fractions. Make sure you add/subtract/multiply/divide according the rules for fractions. If a fraction is negative, then the negative number should be in the numerator. If they are both negative then make it positive andare ok. are not ok. -2-2 PHASE ONE FRACTIONALCOMPLEX () You will want a default constructor that creates the number + i. FRACTIONALCOMPLEX (INTX, INT Y) You will want a two variable constructor that creates the number +}i. FRACTIONALCOMPLEX (INT A, INT B, INT C, INT D) You will want a four variable constructor that creates the number and reduce after entry. b +i. Make sure to watch for invalid numbers PRIVATE REDUCE() You will want to add a private method that double checks both a/b and c/d to make sure that they are reduced. You will be using this a lot, so make sure that it is a method. This is also where you should check the positiveegative of each fraction. PUBLIC PRINTME() Eventually we will be overloading the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!