Program to create a class huge integer which uses a


Using Net Beans IDE (version 8)

write a Java program to create a class Huge Integer which uses a 40-element array of digits to store integers as large as 40 digits each.

• Provide methods parse, to String, add and subtract.

Method parse should receive a String, extract each digit using method char At and place the integer equivalent of each digit into the integer array.

• For comparing Huge Integer objects, provide the following methods: is Equal To, is Not Equal To, is Greater Than, is Less Than, is Greater Than Or Equal To and is Less Than Or Equal To.

Each of these is a predicate method that returns true if the relationship holds between the two Huge Integer objects and returns false if the relationship does not hold.

• Provide a predicate method is Zero.

• If you feel ambitious, also provide methods multiply, divide and remainder.

[Note: Primitive Boolean values can be output as the word "true" or the word "false" with format specified %b.]

In addition to the source codes of your program, in a text file, please provide a user documentation that outlines:

• The logical structure and flow of the program.

• Description of the input files to test the application. (a file with valid data and a file with invalid data)

• A detailed instruction of how the program can be compiled and executed.

• Screen shots of the execution sessions.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Program to create a class huge integer which uses a
Reference No:- TGS01272501

Now Priced at $20 (50% Discount)

Recommended (99%)

Rated (4.3/5)