Question

My goal is to read in a file called "grades.csv", do a few computations on the...

My goal is to read in a file called "grades.csv", do a few computations on the data from this file, then output the results of your computations.

This is what the file says:

Name,Exam 1,Exam 2,Exam 3,Exam 4,Final Exam,Quiz 1,Quiz 2,Quiz 3,Quiz 4,Quiz 5,Quiz 6,Quiz 7,Quiz 8,Quiz 9,Quiz 10,Quiz 11,Quiz 12,Quiz 13,Quiz 14,Quiz 15,Quiz 16,Quiz 17,Quiz 18,Quiz 19,Project,Bonus
Annika Penwell,124,107,101,96,224,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,10,10,120,Y
Hildegarde Steveson,115,97,106,75,178,10,10,10,0,10,0,0,10,10,10,10,10,10,10,0,10,0,10,10,98.799,N
Orpha Maravilla,79,69,81,94,106,0,10,10,10,0,10,8,0,10,0,0,0,10,10,10,0,0,10,10,78.222,Y
Jasper Howery,123,108,115,113,229,10,10,9,10,10,10,10,10,10,10,10,0,10,10,10,10,10,10,10,119.583,Y
Shandi Bowersox,126,103,115,113,204,10,10,10,10,10,10,10,10,5,10,10,4,10,10,10,10,10,10,10,117.333,Y
Eladia Buckelew,122,81,102,92,213,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,112.053,N
Shonta Vanwinkle,87,68,77,44,99,10,10,5,7,5,10,0,10,8,0,10,0,10,10,10,10,10,10,10,23.334,N
Allene Beauchemin,109,75,68,80,181,7,5,10,10,10,0,10,10,8,0,0,10,10,10,0,0,10,10,10,110.694,Y
Kirsten Omalley,126,112,105,113,220,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,120,Y
Consuelo Ridge,110,91,110,105,172,10,5,10,10,10,0,10,3,10,10,0,0,10,10,10,10,0,10,10,119.166,Y
Alix Friddle,124,100,96,104,192,10,10,10,10,7,10,10,10,10,10,8,10,10,10,10,10,10,10,10,108.879,N
Nora Ruoff,123,106,109,87,171,10,10,10,10,9,10,10,10,10,10,10,7,10,10,10,10,10,10,10,111.9615,Y
Providencia Vercher,86,91,40,82,132,10,5,5,10,10,10,10,10,1,7,2,0,10,10,10,10,10,10,10,98.2365,Y
Margret Mulhern,124,107,112,104,211,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,119.3325,N
Devorah Zuccaro,118,66,112,70,181,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,0,N
Charlott Masson,83,87,101,54,194,10,10,10,10,4,0,10,10,1,10,0,1,10,10,0,1,5,10,10,81.9405,Y
Dexter Kurz,120,107,111,113,215,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,115.6245,Y
Nell Luevano,123,87,107,101,165,10,9,0,10,9,10,10,10,1,10,0,7,10,10,10,10,10,10,10,97.572,N
Elfrieda Ehlert,97,81,93,96,173,7,0,10,0,8,10,0,10,10,10,10,0,10,10,10,10,10,10,10,91.821,N
Ervin Gaitan,72,82,96,82,170,8,10,9,8,9,10,10,10,10,10,7,10,10,10,10,10,10,10,10,97.833,Y
Keva Reser,117,106,113,111,194,10,10,10,10,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,114.375,Y
Marchelle Oram,122,69,91,64,146,10,10,10,10,5,10,9,1,1,0,1,3,10,10,10,10,10,10,10,29.0355,N
Etsuko Boeding,87,94,112,72,183,10,5,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,120,Y
Lorita Rakestraw,119,81,103,91,207,10,10,10,10,10,10,8,10,10,10,10,10,10,10,10,10,10,10,10,115.3125,N
Margery Gasser,111,60,111,65,146,7,10,0,6,10,10,8,10,10,10,0,0,10,10,10,7,10,10,10,32.304,N
Bronwyn Moos,99,93,111,73,180,10,4,0,10,9,5,10,10,1,10,10,2,10,10,10,5,0,10,10,75.1875,N
Aline Newcomer,121,105,103,107,202,10,10,10,10,10,10,10,10,8,10,10,7,10,10,10,10,10,10,10,120,Y
Loretta Dirksen,96,85,90,86,178,9,10,9,8,9,10,10,10,0,7,5,10,10,10,10,10,10,10,10,120,Y
Helen Deel,91,84,108,66,192,10,10,5,10,10,10,10,10,10,0,10,10,10,10,10,10,0,10,10,84.9375,N
Hattie Valadez,117,85,77,83,186,8,10,10,10,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,94.3425,Y
Shae Garay,117,103,104,107,191,0,8,10,10,10,10,9,2,10,10,0,10,10,10,10,10,5,10,10,93.5415,Y
Claribel Lebouef,88,57,74,25,0,0,0,10,5,10,10,10,0,10,10,0,0,10,10,0,10,10,10,10,17.0355,N
Bobbye Tischler,119,92,98,110,199,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,120,Y
Grover Sprvill,105,86,102,102,188,10,10,10,10,10,10,10,10,10,9,7.5,9,10,10,10,10,10,10,10,107.541,Y
Katerine Fuhr,125,93,100,102,155,10,10,10,10,10,10,10,10,10,10,10,8,10,10,10,10,10,10,10,92.1915,Y
Janet Ruddock,116,105,107,101,189,7,5,5,10,7,9,6,10,10,8,0,10,10,10,10,10,9,10,10,102.4005,N
Tristan Chao,105,77,70,91,177,10,10,10,10,10,10,10,10,10,0,10,10,10,10,10,0,10,10,10,70.131,Y
Ora Morgenstern,126,110,115,112,217,10,10,10,10,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,114.375,Y
Alethia Baisden,126,90,113,112,205,10,10,10,10,9,10,10,10,5,10,10,10,10,10,10,10,0,10,10,120,Y
Kenisha Myrick,103,81,82,78,142,8,4,7.5,9,0,2,3,10,0,7,7,2,10,10,3,10,7,10,10,114.792,Y
Nakesha Homes,111,90,107,90,165,7,10,10,10,8,10,10,10,0,10,10,0,10,10,10,10,0,10,10,110.983575,N
Mable Belizaire,126,104,115,114,208,10,10,9,10,10,10,10,10,10,10,8,8,10,10,10,10,10,10,10,94.374,N
Zachery Perl,103,79,83,94,173,8,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,100.3485,N
Jerry Poteete,118,98,98,93,152,10,10,10,10,10,10,0,10,10,10,10,10,10,10,10,10,10,10,10,99.6765,Y
Leonardo Curto,119,100,111,1,122,10,0,5,10,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,120,N
Catherine Dallman,95,88,108,92,171,5,5,5,6,10,10,10,10,10,10,0,10,10,10,10,8,10,10,10,91.563525,Y
Stephane Mclester,111,69,65,91,174,10,10,10,10,10,10,0,10,10,9,5,9,10,10,10,10,10,10,10,104.8245,Y
Lyle Kantz,120,99,112,89,189,10,10,10,10,10,10,10,10,0,10,10,5,10,10,10,10,10,10,10,117.222,Y
Houston Mccraw,108,89,106,111,199,10,10,10,10,10,5,10,10,0,10,10,10,10,10,10,10,10,10,10,108.468,Y
Ilda Mccreight,112,85,82,99,200,10,10,10,10,10,10,10,10,10,7,10,10,10,10,10,10,10,10,10,117.291,Y

The first row of the file contains the headings, and each row thereafter is the data for a particular student. The grade is calculated from the following totals:

Exam 1 - 4:   115 points each
Final Exam: 230 points
Quiz 1 - 19:   10 points each
Project:          120 points
Bonus:           if Y (yes), then add 10 points, else (N for no) add 0 points
Total:               4*115 + 230 + 19*10 + 120 = 1000 points
This is what i am supposed to do:
1) Read in the file into an array or multiple arrays. Be careful about what the size of the array is and what data type is stored in this array.

2) Split each row in to multiple pieces (if necessary): Depending on how you completed the step above, you might have read in a String of words separated by commas. The best way to split up this string is by using split method. For example, we use the split method to take str1 and turn it in to an array called array1 containing three Strings that looks like {"Name", "Exam 1", "Exam 2"}:

    String str1 = "Name,Exam 1,Exam 2";
    String[] array1 = str1.split(",");

3) Compute the grade for each student: Once the data is read in, you now have access to each student's score. Knowing the point totals, you can calculate their grade based on the following scale (in percent):
   98-100+ A+
   92-98    A
   90-92        A-
   88-90        B+
   82-88        B
   80-82        B-
   78-80        C+
   72-78        C
   70-72        C-
   68-70        D+
   62-68        D
   60-62        D-
    <60           F
This can be accomplished with a loop.

4) Compute the distribution of grades: Once you calculate everyone's grade, you should keep track of the number of people that received each grade. This can be accomplished with a loop.

5) Compute the average grade: Once you calculate everyone's grade, calculate the average grade for the entire class as a percentage. This can be accomplished with a loop.

Print out the results to console like this:
My goal is to read in a file called
Can someone please help me writing this program? I dont really know how to start and have problems with printing from the file into multiple arrays.

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
My goal is to read in a file called "grades.csv", do a few computations on the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • Read a file called populations.txt and populate a php associative array with the values read from...

    Read a file called populations.txt and populate a php associative array with the values read from the file. Here is an example populations.txt file: Dhaka, 23 million Bangaluru, 21 million New York, 9 million Emporia, 23 thousand Here's some pseudo code: open the file loop through the lines in the file read a line into a string variable explode (or is it split, or something else) the string into key value pairs save the key value pair into your associative...

  • IN PYTHON PLEASE...... Process bowlers and their 3 bowling scores. Use my data file below: bowlers2.txt...

    IN PYTHON PLEASE...... Process bowlers and their 3 bowling scores. Use my data file below: bowlers2.txt ( Showed below) And you can also use a while loop to read your file if you prefer. How to average down an array, which you don’t have to do. In this case that would be the game 1 average for all bowlers for example. Find the low average and high average. Start with read the data into arrays/lists and printed out the arrays/lists...

  • Step 1: Getting Started Create a new .java file named Lab12.java. At the beginning of this...

    Step 1: Getting Started Create a new .java file named Lab12.java. At the beginning of this file, include your assignment documentation code block. After the documentation block, you will need several import statements. import java.util.Scanner; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; Next, declare the Lab12 class and define the main function. public class Lab12 { public static void main (String [] args) { Step 2: Declaring Variables For this section of the lab, you will need to declare...

  • I am having problems with reading a file into an array. This is my code. This...

    I am having problems with reading a file into an array. This is my code. This is what I get when I run my program. But this is my text file I am reading. I tried everything and it seems to be reading in the last digit of the file. I want to read in their names line by line into an array and ultimatly also read in the scores line by line. 1 E/7 Programming Assignment 6.cpp Defines the...

  • IN C++ Write a program in c++ that will read from a file the following sentence:...

    IN C++ Write a program in c++ that will read from a file the following sentence: The quick brown fox jumps over the lazy dog Each word must be read into one location in an array beginning with the first element. You must declare an array as follows: char *words [9] ; // this is an array of c- strings. HINT words[0] will contain "the" words[1] will contain "quick" write a function int length (const char *a) to determine the...

  • Java : Please help me correct my code: create a single class (Program11.java) with a main...

    Java : Please help me correct my code: create a single class (Program11.java) with a main method and some auxiliary methods to input a 2-D array from a disk file, input some “transactions” to change the 2-D array and output the changed 2-D array to another file. Your main method will be minimal (see below). Most of the work will go on in your methods. In main, declare (but do not instantiate) 2-D array. Then call the three methods. The...

  • I need help regarding my Visual Basic code ISC/ITE 285 Homework Due: Monday, January 28 by...

    I need help regarding my Visual Basic code ISC/ITE 285 Homework Due: Monday, January 28 by 11:55 pm Create a text file named "Grades.txt" which will contain a list of numeric grades. Save the file in the projects Bin/Debug folder. A sample of the file contents is shown below: 80 96 95 86 54 97 Create a string array that will be populated from the file "Grades.txt" when the array is created (Class-level array). Also create a numeric array that...

  • Using C programming For this project, you have been tasked to read a text file with student grade...

    Using C programming For this project, you have been tasked to read a text file with student grades and perform several operations with them. First, you must read the file, loading the student records. Each record (line) contains the student’s identification number and then four of the student’s numerical test grades. Your application should find the average of the four grades and insert them into the same array as the id number and four grades. I suggest using a 5th...

  • Python DESCRIPTION Write a program that will read an array of integers from a file and...

    Python DESCRIPTION Write a program that will read an array of integers from a file and do the following: ● Task 1: Revert the array in N/2 complexity time (i.e., number of steps) . ● Task 2: Find the maximum and minimum element of the array. INPUT OUTPUT Read the array of integers from a file named “ inputHW1.txt ”. To do this, you can use code snippet from the “ file.py ” file. This file is provided in Canvas....

  • Please answer Question 4 WITH A C# PROGRAM!!!!!! THANK YOU! File Edit View History Bookmarks Tools...

    Please answer Question 4 WITH A C# PROGRAM!!!!!! THANK YOU! File Edit View History Bookmarks Tools Help Share GEP IIIA Moorhead, MN 10-Day Weathe X N NDSU Faculty and Staff | North x D C#.NET - CSCI 213: Modern Sol X VitalSource Bookshelf: Starting x + + → OO - https://bookshelf.vitalsource.com/#/books/9780134400433/cf1/6 90% *** * Cambie Meble alle... S N 10 Crosby Derek Lam ... Alterna Caviar Anti-Ag... U C# Tutorial For Beginn... BE Celsius Fahrenheit con... Charter Club Sweater. Folklorama...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT