Question
#ifndef HUGEINTEGER_H #define HUGEINTEGER_H #include class HugeInteger { public: HugeInteger( long = 0 ); // conversion/default constructor HugeInteger( const std::string & ); // copy constructor
#ifndef HUGEINTEGER_H #define HUGEINTEGER_H #include
class HugeInteger { public: HugeInteger( long = 0 ); // conversion/default constructor HugeInteger( const std::string & ); // copy constructor
// addition operator; HugeInteger + HugeInteger HugeInteger add( const HugeInteger & ) const;
// addition operator; HugeInteger + int HugeInteger add( int ) const;
// addition operator; // HugeInteger + string that represents large integer value HugeInteger add( const std::string & ) const;
// subtraction operator; HugeInteger - HugeInteger HugeInteger subtract( const HugeInteger & ) const;
// subtraction operator; HugeInteger - int HugeInteger subtract( int ) const;
// subtraction operator; // HugeInteger - string that represents large integer value HugeInteger subtract( const std::string & ) const;
bool isEqualTo( const HugeInteger & ) const; // is equal to bool isNotEqualTo( const HugeInteger & ) const; // not equal to bool isGreaterThan( const HugeInteger & ) const; // greater than bool isLessThan( const HugeInteger & ) const; // less than bool isGreaterThanOrEqualTo( const HugeInteger & ) const; // greater than // or equal to bool isLessThanOrEqualTo( const HugeInteger & ) const; // less than or equal bool isZero() const; // is zero void input( const std::string & ); // input void output() const; // output private: int integer[40]; }; // end class HugeInteger
#endif
Use the header file given to create "HugeInt.cpp" and "testHugeInt.cpp" to test all the functions defined in the interface.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started