in Java Develop a method called normalizeGrades() in Java following the details below: The method should accept an array of numeric grades as argument. Each grade in the array is a numeric value (of type double) between 0 to 100. The method should create an integer array of grades, following: If a grade in the array is greater than 50, then the method should round the numeric grade to the nearest integer value using Math.round() method, and then again round it to an integer grade to a nearest multiple of 5. If a grade in the array is less than or equal to 50, then the method should round the numeric grade to the nearest integer value using Math.round() method. The method should create a character array of letter grades, using a switch statement by translating the integer grades created in (b) to an array of letter grades of type character, following the grade notation: 100 or 95 or 90 85:           A 70, 75, 80:                         B 55, 60, 65:                         C 50:                                     D 0 to 49:                              F The method should print the integer array of grades. The method should return the array of letter grades created in (c).

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter8: Advanced Method Concepts
Section: Chapter Questions
Problem 2E
icon
Related questions
Question

in Java

Develop a method called normalizeGrades() in Java following the details below:

  1. The method should accept an array of numeric grades as argument. Each grade in the array is a numeric value (of type double) between 0 to 100.
  2. The method should create an integer array of grades, following:
    • If a grade in the array is greater than 50, then the method should round the numeric grade to the nearest integer value using Math.round() method, and then again round it to an integer grade to a nearest multiple of 5.
    • If a grade in the array is less than or equal to 50, then the method should round the numeric grade to the nearest integer value using Math.round() method.
  1. The method should create a character array of letter grades, using a switch statement by translating the integer grades created in (b) to an array of letter grades of type character, following the grade notation:

100 or 95 or 90 85:           A

70, 75, 80:                         B

55, 60, 65:                         C

50:                                     D

0 to 49:                              F

  1. The method should print the integer array of grades.
  2. The method should return the array of letter grades created in (c).

For example:

If the input array is:

{100, 28.2, 83.3, 76.1, 56, 36, 73, 72.49, 62.5, 92.1, 57.5, 49.5, 52.4}

 

The method should create and print an integer array:

[100, 28, 85, 75, 55, 36, 75, 70, 65, 90, 60, 50, 50]

 

The method should return the character array of letter grades:

{A, F, A, B, C, F, B, B, C, A, C, D, D}

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage