Write a Java program to read a file that contains lines of CSV. Each line contains a
Question:
Write a Java program to read a file that contains lines of CSV.
Each line contains a name and a list of grades, separated by commas. Store these values in a two-dimensional array. Then, write a method that takes this array as an argument and calculates the average grade for each student.
Test Cases: Test Case: Given a file with the following content:
John,80,90,70
Jane,85,95,75
Alice,80,70,60
Bob,90,80,70
Our program should print:
John's average grade is 80.0
Jane's average grade is 85.0
Alice's average grade is 70.0
Bob's average grade is 80.0
Hint: Use the split method of the String class to split each line into a name and grades. Then, convert the grades to integers and calculate the average
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill