Question: Define and implement a class HugeInteger that represents integers of 300 digits and a few simple operations on them, as indicated below. You will continue
Define and implement a class HugeInteger that represents integers of 300 digits and a few simple operations on them, as indicated below. You will continue to modify and otherwise develop this program in the future assignments. For now define a static constant hugeIntegerSize = 300. The integers are to be represented, in decimal notation, by a private data structure that consists of A byte array of decimal digits 0-9, of which the position of a digit equals to the corresponding power of 10. The integers sign use these methods HugeInteger(int length),HugeInteger(String str),int getLength(),byte getDigit(int index),void print(HugeInteger i),String toString(),void Assign(HugeInteger i),Boolean operations for equality check as well as greaterThan and lessThan relatation,Add, Subtract, and Mult, Divide. a) Modify your HugeInteger class to implement the same interface as before, but use Javas ArrayList now so as to deal with HugeIntegers of any size. You should test your program exactly as before (and we will test it separately with really huge integers!). b) Add one more method, public void multPerformance(hugeInter a, hugeInteger b), which, prints the product ab along with the time it took to compute it. Please give me full java program for this asap.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
