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 handleString 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
Failed
Show what's missing
Enter a filename
ttxtENTER
Enter a lower bound
ENTER
Sum of all numbers in ttxt is
Test Case
Failed
Show what's missing
Enter a filename
ttxtENTER
Enter a lower bound
ENTER
Sum of all numbers in ttxt is
Test Case
Failed
Show what's missing
Enter a filename
ttxtENTER
Enter a lower bound
ENTER
CS error: Found no numbers above
Test Case
Failed
Show what's missing
Enter a filename
ttxtENTER
Enter a lower bound
ENTER
CS error: Found no numbers above
Test Case
Failed
Show what's missing
Enter a filename
tetxtENTER
Enter a lower bound
ENTER
CS error: Couldn't open tetxt
Test Case
Failed
Show what's missing
Enter a filename
tetxtENTER
Enter a lower bound
ENTER
CS error: Couldn't open tetxt
Test Case
Failed
Show what's missing
Enter a filename
err.txtENTER
Enter a lower bound
ENTER
CS 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
