Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help with this program. You will create a class definition that will repr

ID: 3613524 • Letter: I

Question

I need help with this program. You will create a class definition that will represent arational number.

The class definition will contain members to store the numeratorand denominator of the rational number.

You should include the following member functions which areaccessible from outside of the class.
  • add - accepts one rational number parameter which is added tothe current object
  • subtract - accepts one rational number parameter which issubtracted from the current object
  • multiply - accepts one rational number parameter which ismultiplied by the current object
  • divide - accepts one rational number parameter which thecurrent object will be divided by
  • negate - will accept no parameters and will return a newrational number object which is the negative of the current
  • lessthan - will accept one parameter and produce a boolean toindicate whether or not the current object is less than it
  • equalto - will accept one parameter and produce a boolean toindicate whether or not the current object is equal to it
You should include a default constructor, and a constructor whichwill initialize the member data.

You should include code in your main function to demonstrate thatthe member functions work.
I need help with this program. You will create a class definition that will represent arational number.

The class definition will contain members to store the numeratorand denominator of the rational number.

You should include the following member functions which areaccessible from outside of the class.
  • add - accepts one rational number parameter which is added tothe current object
  • subtract - accepts one rational number parameter which issubtracted from the current object
  • multiply - accepts one rational number parameter which ismultiplied by the current object
  • divide - accepts one rational number parameter which thecurrent object will be divided by
  • negate - will accept no parameters and will return a newrational number object which is the negative of the current
  • lessthan - will accept one parameter and produce a boolean toindicate whether or not the current object is less than it
  • equalto - will accept one parameter and produce a boolean toindicate whether or not the current object is equal to it
You should include a default constructor, and a constructor whichwill initialize the member data.

You should include code in your main function to demonstrate thatthe member functions work.

Explanation / Answer

x.