Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

students.txt : first_name,last_name,grade1,grade2,grade3,grade4,grade5 Dylan,Kelly,97,99,95,88,94 Tom,Brady,100,90,54,91,77 Adam,Sandler,90,87,78,66,55 Michael,Jordan,80,95,100,89,79 Elon,Musk,80,58,76,100,95 output look like: Dylan Kelly -------------------------- Assignment 1: A Assignment 2: A Assignment 3: A Assignment 4:

image text in transcribed

students.txt :

first_name,last_name,grade1,grade2,grade3,grade4,grade5 Dylan,Kelly,97,99,95,88,94 Tom,Brady,100,90,54,91,77 Adam,Sandler,90,87,78,66,55 Michael,Jordan,80,95,100,89,79 Elon,Musk,80,58,76,100,95

output look like:

Dylan Kelly

--------------------------

Assignment 1: A

Assignment 2: A

Assignment 3: A

Assignment 4: B

Assignment 5: A

Final Grade: 94.6 = A

PROBLEM You are given a file named "students.txt". Each row in the file contains a student's first name, last name, and their grades for 5 assignments. You will need to create an array called finalGrades. Set the size of this array to how many rows are in the file (not counting the header row). This array will store all the final grades for each student. For each row in the file (except the header row): 1) Store firstName and lastName as Strings, and then store the 5 grades into an array called grades. 2) Calculate the letter grade for each assignment (A >= 90, B >= 80, C >= 70, D >= 60. E >= 50). 3) Calculate the average grade of the 5 assignments. (Final grade) 4) Store the final grade into the finalGrades array 5) Write the students name, the letter grade of each assignment, and their final grade to a text file named "output.txt" At the end, write the lowest final score, highest final score, and the average final score to "output.txt". REQUIRED METHODS a) A method to calculate the average of a double array. b) A method to calculate the minimum of a double array. c) A method to calculate the maximum of a double array. d) A method to Calculate a letter grade for each assignment based on the grade percentage. e) A method to write a student's name, letter grade of each assignment, and their final grade to a text file. (This method should call method d and a) RUBRIC 15 points - All the required methods are declared, defined, and used properly. 15 points - Your output file is identical to the sample PDF provided 10 points - Your program compiles and runs without any errors. 10 points - All methods MUST use JavaDoc comments

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

Step: 3

blur-text-image

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

Navigating The Supply Chain Maze A Comprehensive Guide To Optimize Operations And Drive Success

Authors: Michael E Kirshteyn Ph D

1st Edition

B0CPQ2RBYC, 979-8870727585

More Books

Students also viewed these Databases questions