Question: I am having errors with this Java code Please solve the errors I don t believe you need the csv file PLEASE SOLVE, MAKE THE

I am having errors with this Java code
Please solve the errors
I dont believe you need the csv file
PLEASE SOLVE, MAKE THE NECESSARY AND COMMENT WHERE THE CHSNGES WERE MADE
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class Main {
public static void main(String[] args){
// Read CSV file and create Cell objects
List cellList = new ArrayList();
try (BufferedReader br = new BufferedReader(new FileReader("cells.csv"))){
String line;
while ((line = br.readLine())!= null){
String[] data = line.split(",");
// Perform data cleaning and transformations here
// Create Cell object and add to cellList
cellList.add(new cell(data[0], data[1], Integer.parseInt(data[2]), data[3], data[4], Float.parseFloat(data[5]), data[6], data[7], Float.parseFloat(data[8]), data[9], data[10], data[11]));
}
} catch (IOException e){
e.printStackTrace();
}
// Converts cellList to array to allow for an easier manipulation
cell[] cell = cellList.toArray(new cell[0]);
//List unique values for each column
System.out.println("Unique values for OEMs: "+ cell.listUniqueValues("oem", cell));
System.out.println("Unique values for Models: "+ cell.listUniqueValues("model", cell));
//Add a new cell
cell newCell = new cell("Apple", "iPhone 15",2023, "Active", "147.6*71.6 mm",171.8f,"A-16", "Super Retina XDR OLED", 6.1f,"2556*1179","A15 Bionic", "iOS 17.0.2");
cell = cell.addCellObject(cell, newcell);
//Calculate mean of body weight
System.out.println("Mean body weight: "+ cell.calculateMean("bodyWeight", cell));
System.out.println("Mean display size: "+ cell.calculateMean("displaySize", cell));
//Unit Testing
//Test for bodyWeight
System.out.println("Test for bodyWeight: "+ cell.calculateMean("bodyWeight", cell));
System.out.println("Test for average weight: "+ cell.calculateAverageWeight("averageWeight", cell));
//Generated Report
System.out.println(cell.generateReport);
}

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 Programming Questions!