Answered step by step
Verified Expert Solution
Question
1 Approved Answer
import java.io . File; import java.io . IOException; import java.util.ArrayList; import java.util.Scanner; public class Arithmetic { / * * This class reads a file containing
import java.ioFile;
import java.ioIOException;
import java.util.ArrayList;
import java.util.Scanner;
public class Arithmetic
This class reads a file containing arithmetic expressions and returns an
array list of the results.
@param filename the file name
@return a list of results
public static ArrayList readString filename throws IOException
Your code goes here
This method checks your work.
public static String checkString filename
try
return readfilenametoString;
catch IOException ex
return IO exception thrown";
catch Exception ex
return exgetClassgetName;
public static void mainString args throws IOException
Scanner console new ScannerSystemin;
String inputFileName console.nextLine;
String result checkinputFileName;
System.out.printlnresult;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started