Question: IN JAVA PLEASE Program 1: BigNumber class In languages such as CH and Java, the primitive data type int is limited to a 32 bit

IN JAVA PLEASE
IN JAVA PLEASE Program 1: BigNumber class In languages such as CH

Program 1: BigNumber class In languages such as CH and Java, the primitive data type int is limited to a 32 bit or 64 bit representation. Construct a class, BigNumber, to represent very large integers - integers greater than 2,147,483,647. Write the necessary class methods allowing the addition of any two BigNumber objects. Assume only addition will be performed on this class of numbers. Write a test application that prompts the user for two BigNumber data elements and add them together. Test Execution 1: x.add(y); should produce Test Execution 2: y = 21 X.add(y); should produce Test Execution 3: x = 19 y = 765521 x.add(y); should produce 765540 Suggestions: 1. Treat each big number as a String containing a collection of digits. 2. Add the BigNumbers digit by digit, adding a carry value when necessary. For example, the big numbers 778321 and 100000 are stored as strings. But, when summing the two, an ArrayList of Integers can be used to compute independent digits. big[0= 1 big[1] = 2 big/21 - 3 big31= 8 big[4] = 7 big 51 - 8

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!