#methods

6 messages · Page 1 of 1 (latest)

peak juniper
#

Can anyone help me with a coding method and array project

ancient bane
#

Please post more details about what you need help with

peak juniper
#

basically the project has to

  1. read 3 test grades of 4 students from a file ( i got that part down)
  2. check if any of the grades are below zero & if they are, then the name of the student has to be printed along with the test grades and a message that the test grades are invalid and then “add to the count of the student data with errors” (idk what this means)
  3. if all the test grades are valid ( no negatives) then it has to determine the average grade for each student (method called findAverage) & will read the average. and it should be returned in the form of a double, & then the letter grade will be determined based off of the average. ( the method would be called getGrade)
  4. greater than or equal to 90 is ‘A’, between 80 and 89 is ‘B’, between 70-79 is ‘C’, and 65-70 is D otherwise F.
    the program prints a file listing of the full name , 3 test grades , average & letter grade using printF & when there are no more students it prints the total students read in.
ancient bane
#

What is the problem with number 2? They are just saying that if one of the 3 grades are negative then you need to keep a count of students that had errors in their data to print it out at the bottom