Question: Create a class called FileSumWrapper with a method that has the signature public static void handle ( String filename, int lowerBound ) Make this method

Create a class called FileSumWrapper with a method that has the signature
public static void handle(String filename, int lowerBound)
Make this method call FileSum.read and make your method catch all the errors.
FileSum.read is a method that takes a filename and a lower bound, then sums up all the numbers in that file that are equal to or above the given lower bound.
Test Case 1
Failed
Show what's missing
Enter a filename
t1.txtENTER
Enter a lower bound
50ENTER
Sum of all numbers in t1.txt is 665177
Test Case 2
Failed
Show what's missing
Enter a filename
t1.txtENTER
Enter a lower bound
500ENTER
Sum of all numbers in t1.txt is 662410
Test Case 3
Failed
Show what's missing
Enter a filename
t1.txtENTER
Enter a lower bound
5000000ENTER
CS112 error: Found no numbers above 5000000
Test Case 4
Failed
Show what's missing
Enter a filename
t1.txtENTER
Enter a lower bound
6000000ENTER
CS112 error: Found no numbers above 6000000
Test Case 5
Failed
Show what's missing
Enter a filename
t1e.txtENTER
Enter a lower bound
50ENTER
CS112 error: Couldn't open t1e.txt
Test Case 6
Failed
Show what's missing
Enter a filename
t11e.txtENTER
Enter a lower bound
50ENTER
CS112 error: Couldn't open t11e.txt
Test Case 7
Failed
Show what's missing
Enter a filename
err.txtENTER
Enter a lower bound
50ENTER
CS112 error: Was reading integers but found something else

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!