Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE HELP WITH JAVA! Project Requirements: Read CSV files for student grades and populate them in a map or class Get the total class average

PLEASE HELP WITH JAVA!
Project Requirements:
Read CSV files for student grades and populate them in a map or class
Get the total class average
Get the stat about How many A and how many F
Given a Student ID show all the information about the student
Show all the Student records
Bonus: write back the CSV with the student ID/Name and Grade in the local file
package citytech.automation;
import java.io.BufferedReader;
import java.io.FileReader;
public class RosterAutomation {
public static void main(String[]args){
//Map studentMap = new HashMap();
/*
* ID Name quiz 10/2% Test-1/50/10%| Mid-Term /50/30%| Test-3/30/10% Final /50/40% Presentation 2% Coding Project/6%
*23207161 Philip Don 104250224926
*
* quiz /2%=(10/10)*2=2
* Test-1/50/10%=(42/50)*10=8.4
* Mid-Term /50/30%=(50/50)*30=30
* Test-3/30/10%=(22/30)*10=7.3
* Final /50/40%=(49/50)*40=39.2
* Presentation 2%=(2/2)*2=2
* Coding Project/6%=(6/6)*6=6
*-------------------------------------------------
* Total Score =94.9 letter grade: A
*
**/
var line ="";
var splitBy =",";
var fileName = "class_roster_project.csv";
try {
FileReader fileReader = new FileReader(fileName);
BufferedReader br = new BufferedReader(fileReader);
System.out.println(br.readLine());
line = br.readLine();
// array : 0123456789
// value ="23207167,Dindyal,Rajendra N,10,45,50,30,49,2,6"
while(line != null){
System.out.println(line);
String[] values = line.split(splitBy);
String id = values[0];
String firstName = values[1];
String lastName = values[2];
double quiz = Double.parseDouble(values[3]);
double test1= Double.parseDouble(values[4]);
double midterm = Double.parseDouble(values[5]);
double test3= Double.parseDouble(values[6]);
double finalTest = Double.parseDouble(values[7]);
double presentation = Double.parseDouble(values[8]);
double project = Double.parseDouble(values[9]);
line = br.readLine();
}
} catch (Exception e){
throw new RuntimeException(e.toString());
}
}
}
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions

Question

Explain the purpose of project organization.

Answered: 1 week ago

Question

=+impact when these municipalities build stadiums and arenas?

Answered: 1 week ago

Question

1.what is rule of law? 2.The administrative body of government?

Answered: 1 week ago

Question

How much sales tax did Dillards pay in New Mexico (NM)?

Answered: 1 week ago