Question: HugeInteger Class Create a class HugeInteger that uses a 40-element array of digits to store integers as large as 40 digits each. Provide friends member
HugeInteger Class Create a class HugeInteger that uses a 40-element array of digits to store integers as large as 40 digits each. Provide friends member functions input, output, add, subtract, multiply, divide and reminder. For comparing HugeInteger objects, provide functions isEqualTo, isNotEqualTo, isGreaterThan, isLessThan, isGreaterThanOrEqualTo and isLessThanOrEqualToeach of these is a predicate function that simply returns true if the relationship holds between the two HugeIntegers and returns false if the relationship does not hold. Also, provide a predicate function isZero. Overload input, output, arithmetic, equality and relational operators so that you can write expressions containing HugeInteger objects, rather than explicitly calling member functions. Add comments (preconditions, postconditions, and purpose for each function) as needed to make your code understandable. Run a sample output. It is always a great idea to have a sample output with default values in the driver cpp file and a menu to have the user selects the operator to be checked. Paste your code and your sample outputs into a word document or a pdf. And upload. Remember, validate your entry whenever there is a users entry. Without demonstration, you will earn 10% of the grade only. This is a sample driver cpp file // HugeInt test program. #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
