Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

hi I have sme error in the cade i don't know how to fix that can you help me i send the question and the

hi I have sme error in the cade i don't know how to fix that can you help me

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

i send the question and the code i write the problem is. when i chooes the import in java is not working

Write a program that reads a text file named test_scores.txt to read five test scores. The program should display a each test score, letter grade for each test score, average of five test scores and finally the letter grade for the average test score. Write the following methods in the program: averageCalculation - this method should accept the total of all test scores as argument and return the average of the scores. gradeDetermination - this method should accept a test score as an argument and return a letter grade for the score, based on the following grading scale: Score Letter Grade 90-100 A 80-89 B 70-79 60-69 D Below 60 F Please write the Javadoc comment before each method which explains the working of method, parameters it receives and return value. Expected Output: Score for testi is: 83.0 27 sty 24 Grade for testi is: B Score for test2 is: 75.0 Grade for test2 is: C Score for test3 is: 66.0 Grade for testa is: D Score for test4 ist 51.5 Grade for test is: F Score for tests is: 96.5 Grade for tests is: A Average of test scores is:74.4 The final Grade is: C ) /** ava uva ava va va va va va *HW5_Esma.java 1 package ICI; 2 & 30 import java, 10.FileNotFoundException: 4 import java.util.Scanner; 50 6 * @author haptop laptop 7 */ 8 class Main 90 10 * @param args the command line arguments 11 W/ 120 public float averageCalculation float arrti, int n) 13 14 float average=0; // average 15 for (int 1=0; i90&&marksc=100)//11 else to compute grade 25 return 'A': 26 else if(marks>=80&&marksca89) 27 return 'B': 28 else if(marks>#708&marksca79) 29 return 'C': 30 else if(marks>60&&marksc=69) 31 return 'D': 32 else if (marks906bmarkses100 // if else to compute grade return 'A': else if(marksa31&marksca89) return 'B': else 11(marks>a70&emarksen79) return 'c': else if(marks>608&marksen69) return 'D': else if (marks<>

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

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

More Books

Students also viewed these Databases questions