Question: SUBMIT SumBigInts.java I change to the following specifications that will be strictly enforced: 1. Submit SumBigInts.java with a main method plus at least three other
SUBMIT SumBigInts.java
I change to the following specifications that will be strictly enforced:
1. Submit SumBigInts.java with a main method plus at least three other methods that help you solve this assignment in a well structured form.
2. Define "interactive" in the text as interacting with input from a File as used in test code below. So the provided main() below MUST work.
3. Use MAX_DIGITS to determine the length of int[ ] arrays. I will change this upon testing. Maybe just start with code provided below:
// This program reads an input file that contains sequences of integers to // be added together. The program reads them as Strings so that it can // process large integers. Reset the constant DIGITS to allow it to handle // larger integers. import java.io.*; import java.util.*; public class SumBigInts { public static final int MAX_DIGITS = 25; public static void main(String[] args) throws FileNotFoundException { Scanner input = new Scanner(new File("sum.txt")); processFile(input); } ... // more methods follow for i/o and add and ..... }
And here's the test text file to read plus the expected output to System.out


Input file sum.txt 82384 204 435 22 31 12 999 483 28350 28345 39823 95689 234856 3482 55328 934803 7849323789 22398496 8940 729348690234239 3948692348692348693486235 5834938349234856234863423 32489 859320 542890432323 534322343298 432432 58903 34 82934 49802390432 8554389 4789432789 0 48372934287 0 8943242 7482343 0 4879023 3333333333 4723 3333333333 6642 3333333333 Output that should be produced 82384 82384 204 + 435 639 22 + 31 + 12 = 65 999 + 483 = 1482 28350 + 28345 + 39823 + 95689 + 234856 + 3482 + 55328 + 934803 = 1420676 7849323789 + 22398496 8940 + 32489 + 859320 = 7872623034 729348690234239 + 542890432323 + 534322343298 730425903009860 3948692348692348693486235 + 5834938349234856234863423 9783630697927204928349658 999999999999999999999999 + 432432 + 58903 + 34 = 1000000000000000000491368 82934 + 49802390432 + 8554389 + 4789432789 + 0 + 48372934287 = 102973394831 0+0+0=0 7482343 + 0 + 4879023 + 0 + 8943242 = 21304608 3333333333 + 4723 + 3333333333 + 6642 + 3333333333 = 10000011364 Total lines 14
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
