Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a class named StatAnalysis that contains at least the methods described b

ID: 3694809 • Letter: C

Question

Create a class named StatAnalysis that contains at least the methods described below, as well as fields that help store the data found in the file you will analyze. This class must include the following method:

public String mode (int columnNumber) –this method returns the mode (the most frequent element) from a column.IMPORTANT: Updated! Tread the column as String even if the data contained within it is numerical. If the column number is incorrect, the method should return the special value null.

Explanation / Answer

Try with the below code by creating a program in CPP

ReadCSV reader = new ReadCSV("file.csv");

String[] header = reader.getHeader();

String[] columnType = reader.colTypes();

String [] data;
while ( (data = reader.getLine()) != null) {
// do something with the data
}

Double d = Double.parseDouble(data[5]); // converts the 6th column into a double
Integer i = Integer.parseInteger(data[2]); // converts the 3rd column into an integer

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote