Develop a method called normalizeGrades() in Java following the details below: a. The method should accept...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Develop a method called normalizeGrades() in Java following the details below: a. 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. b. The method should create an integer array of grades, following: o 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. o 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. c. 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: 70, 75, 80: 55, 60, 65: 50: 0 to 49: d. The method should print the integer array of grades. e. 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} A B C D F 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} Develop a method called normalizeGrades() in Java following the details below: a. 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. b. The method should create an integer array of grades, following: o 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. o 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. c. 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: 70, 75, 80: 55, 60, 65: 50: 0 to 49: d. The method should print the integer array of grades. e. 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} A B C D F 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 Answer:
Related Book For
Starting Out With Java From Control Structures Through Data Structures
ISBN: 9780133957051
6th Edition
Authors: Tony Gaddis
Posted Date:
Students also viewed these programming questions
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
The Research and Innovative Technology Administration of the Bureau of Transportation Statistics reports load factors (passenger-miles as a percentage of available seat-miles) for commercial airlines...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
The monochromatic emissivity of a diffuse-surface at 1600 K varies with wavelength in the following manner : = 0.4 for 0
-
In what sense is a reinvestment rate assumption embodied in the NPV, IRR, and MIRR methods? What is the assumed reinvestment rate of each method?
-
What does having a positive rate of time preference have to do with positive interest rates?
-
What is the potential difference across resistor R? A. - 3.0V B. - 4.0V c. - 5.0 v D. - 6.0V E. - 10V 10 V 1=1.0 A www-ww 602 R
-
Neal Manufacturing Company makes tents that it sells directly to camping enthusiasts through a mail-order marketing program. The company pays a quality control expert $60,000 per year to inspect...
-
How do different valuation methods, such as discounted cash flow (DCF) analysis, price-to-earnings (P/E) ratios, and price-to-book (P/B) ratios, differ in their approach to determining stock value?
-
A 3 MWe wind turbine can be placed at either Site A or B, which have respective probability density functions for the wind velocity at the site (assume that the power output of the turbine varies as...
-
1. Kiko started business on July 15, 2021, When is the deadline for him to file his income tax for taxable year 2021? (answers should be formatted using dd/mm/yyyy) Solution not required. 2. DB...
-
The financial director deploys a policy regarding approval of payments for travel reimbursements of employees. Payments must be approved by the accounting manager for all payments under $1,000 and...
-
Explore the concept of spectralism in contemporary orchestral music, focusing on the manipulation of sound spectra and the synthesis of complex harmonic textures to evoke unique timbral landscapes.
-
The probabilities of an economic boom, normal economy, and a recession are 2 percent, 93 percent, and 5 percent, respectively. For these economic states, Stock A has deviations from its expected...
-
Jumbo Shrimp Oxymorons, Inc. recently paid a dividend of $2.15 per share. The firm expects explosive growth of 20% over the next two years. After that the firm's managers expect that growth will drop...
-
What is the time during which audience members may stand and stretch, use the restroom, or purchase refreshments?
-
Read the following scenario and answer the question. You work for AdSmart, a marketing research firm. You and new coworker are meeting a potential client for lunch. You have several morning meetings...
-
Prove the formula for (d/dx)(cos-1x) by the same method as for (d/dx)(sin-1x).
-
Assuming the following declaration exists: Enum Seasons { SPRING, WINTER, SUMMER, FALL } What is the fully qualified name of the FALL constant? a. FALL b. Enum.FALL c. FALL.Seasons d. Seasons.FALL
-
True or False: A JList component automatically appears with a line border drawn around it.
-
What happens in Java when a program tries to use a subscript that is out of bounds?
-
The pendulum on a grandfather clock has a period of 2.00 s. If the clock is not wound, the pendulums amplitude begins to decay at a rate of 0.53% each pendulum period. a. What is the time constant of...
-
A block with a mass of 0.28 kg is attached to a horizontal spring. The block is pulled back from its equilibrium position until the spring exerts a force of 1.0 N on the block. When the block is...
-
The motion of a nightingales wingtips can be modeled as simple harmonic motion. In one study, the tips of a birds wings were found to move up and down with an amplitude of 8.8 cm and a period of 0.82...
Study smarter with the SolutionInn App