Big Integers
Summary
Your assignment is to implement an arbitrary length integer type that
supports most (if not all) of the standard integer operations.
Details
You must implement a BigInt class. BigInt must support the following:
- Operators +, -, *
- Operators ==, !=, <, <=, >, >=
- Operator =
- A default constructor, a copy constructor, a constructor that
takes an int, and a constructor that takes a string representation of
an arbitrary length integer
- Output via ostream and the insertion (<<) operator
The minimum interface is provided for you here.
You will need to add additional members and methods to this class definition,
but you MUST implement at least those functions.
Further, your multiplication routine must run in O(nlg
3) time.
Additionally, you must provide a detailed testing system. Your
testing of your BigInt class will be 15% of your grade.
This assignment is expected to be two or three times as complicated as
the previous assignment. Although the algorithm is relatively simple,
the details are difficult to perfect. Do not underestimate the time
that testing and debugging will take. Make sure that
every other function works properly before you attempt to deal with
multiplication.
Remember that you are expected to adhere to good coding practices, both
in terms of coding style and code structure.