Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

***in Java with screenshots please*** Write a program that asks user to enter 5 test scores (test scores can have decimal places in them). The

***in Java with screenshots please***

Write a program that asks user to enter 5 test scores (test scores can have decimal places in them).

The program should display a letter grade for each score and average test score.

Write the following methods and invoke/call/use them from main method:

calcAverage : this method accepts 5 test scores as arguments and return average of the scores.

determineGrade - this method should accept one test score as an argument and return a letter grade for the score, based on the following grading scale:

  • 90 - 100 : A
  • 80 - 89 : B
  • 70 - 79 : C
  • 60 - 69 : D
  • Below 60 : F

Sample input :

Enter score for test 1 : 90.5

Enter score for test 2 : 80

Enter score for test 3 : 70.5

Enter score for test 4 : 60

Enter score for test 5: 85

Sample output:

Grade for test 1 : A

Grade for test 2 : B

Grade for test 3 : C

Grade for test 4 : D

Grade for test 5 : B

Average score : 77.2

Letter grade for average : C

image text in transcribed
Write a program that asks user to enter 5 test scores (test scores can have decimal places in them) The program should display a letter grade for each score and average test score. Write the following methods and invoke/call/use them from main method: calcAverage: this method accepts 5 test scores as arguments and return average of the scores. determineGrade this method should accept one test score as an argument and return a letter grade for the score, based on the following grading scale: .90-100:A 80-89 B 70-79: C 60-69:D e Below 60:F Enter score for test 1:90.5 Enter score for test 2:80 Enter score for test 3:70.5 Enter score for test 4:60 Enter score for test 5: 85 Grade for test 1 : A Grade for test 2: B Grade for test 3:C Grade for test 4:D Grade for test 5:B Average score: 773 Letter grade for average: C

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2019 Wurzburg Germany September 16 20 2019 Proceedings Part 2 Lnai 11907

Authors: Ulf Brefeld ,Elisa Fromont ,Andreas Hotho ,Arno Knobbe ,Marloes Maathuis ,Celine Robardet

1st Edition

3030461467, 978-3030461461

More Books

Students also viewed these Databases questions