In this program, create a method with the following signature: public static double getAverage(double d1, double d2, double d3, double d4, double d5) This method will accept five doubles and return the average. Also in program, create a method with the following signature: public static char determineGrade(double avg) This method will take an average, then return the corresponding letter grade. Write in java and use test case# as an example
In this program, create a method with the following signature: public static double getAverage(double d1, double d2, double d3, double d4, double d5) This method will accept five doubles and return the average. Also in program, create a method with the following signature: public static char determineGrade(double avg) This method will take an average, then return the corresponding letter grade. Write in java and use test case# as an example
Enhanced Discovering Computers 2017 (Shelly Cashman Series) (MindTap Course List)
1st Edition
ISBN:9781305657458
Author:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Chapter3: Computers And Mobile Devices: Evaluating Options For Home And Work
Section: Chapter Questions
Problem 17SG
Related questions
Question
In this program, create a method with the following signature: public static double getAverage(double d1, double d2, double d3, double d4, double d5)
This method will accept five doubles and return the average.
Also in program, create a method with the following signature:
public static char determineGrade(double avg)
This method will take an average, then return the corresponding letter grade.
Write in java and use test case# as an example.
![Test Case 1
Enter 5 scores \n
90.99 5 100 96 ENTER
Average: 78.0 \n
Letter grade: C\n
Test Case 2
Enter 5 scores \n
80 85 81 99 100 ENTER
Average: 89.0 \n
Letter grade: B\n
Test Case 3
Enter 5 scores \n|
90 40 59 6669ENTER
Average: 64.8 \n
Letter grade: D\n](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F13307738-e971-460f-8446-e024a615e31e%2Fd6b60a93-5588-4b37-8f03-9df7ac769e0f%2Fdd27d6l_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Test Case 1
Enter 5 scores \n
90.99 5 100 96 ENTER
Average: 78.0 \n
Letter grade: C\n
Test Case 2
Enter 5 scores \n
80 85 81 99 100 ENTER
Average: 89.0 \n
Letter grade: B\n
Test Case 3
Enter 5 scores \n|
90 40 59 6669ENTER
Average: 64.8 \n
Letter grade: D\n
![Test Case 4
Enter 5 Scores|\n
40 30 60 10 2 ENTER
Average: 28.4 \n
Letter grade: F\n
Test Case 5
Enter 5 Scores \n
90 99 95 8497 ENTER
Average: 93.0 \n
Letter grade: A\n](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F13307738-e971-460f-8446-e024a615e31e%2Fd6b60a93-5588-4b37-8f03-9df7ac769e0f%2F5qccylf_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Test Case 4
Enter 5 Scores|\n
40 30 60 10 2 ENTER
Average: 28.4 \n
Letter grade: F\n
Test Case 5
Enter 5 Scores \n
90 99 95 8497 ENTER
Average: 93.0 \n
Letter grade: A\n
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 5 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Enhanced Discovering Computers 2017 (Shelly Cashm…](https://www.bartleby.com/isbn_cover_images/9781305657458/9781305657458_smallCoverImage.gif)
Enhanced Discovering Computers 2017 (Shelly Cashm…
Computer Science
ISBN:
9781305657458
Author:
Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:
Cengage Learning
![Enhanced Discovering Computers 2017 (Shelly Cashm…](https://www.bartleby.com/isbn_cover_images/9781305657458/9781305657458_smallCoverImage.gif)
Enhanced Discovering Computers 2017 (Shelly Cashm…
Computer Science
ISBN:
9781305657458
Author:
Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:
Cengage Learning