Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

ISBN: 1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

Explain evaluative criteria and their measurement?

Answered: 1 week ago