Question: the starter code is provided and the input file is also provided. IN JAVA o usages ublic static void main(String[] args) throws FileNotFoundException { I/

the starter code is provided and the input file is also provided. IN JAVAthe starter code is provided and the input file is also provided.IN JAVA o usages ublic static void main(String[] args) throws FileNotFoundException \{I/ add the filename Scanner in = new Scanner(new File( pathname: "files/"));I/ declare and initialize variables if needed while(in.hasNextInt())\{ int no = in.

o usages ublic static void main(String[] args) throws FileNotFoundException \{ I/ add the filename Scanner in = new Scanner(new File( pathname: "files/")); I/ declare and initialize variables if needed while(in.hasNextInt())\{ int no = in. nextInt(); II add your code here \} I/ display the results in.close(); The input file consists of a single column of int numbers. Write a program to 1. read this file 2. compute the sum and average of the even and odd numbers (separately) 3. display the results. In addition, add exception handling to the program. In your program write and use the following method: : returns true if n is even, otherwise false input: . You must download this file, save it in the files subfolder in the project folder and provide this filename to the Scanner in the starter code

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!