Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA 5A Implement a public static String[] showMetrics(Patient[] patients) method that returns the minimum, maximum, and average ages for the deceased and recovered patients, respectively,

JAVA

5A

Implement a public static String[] showMetrics(Patient[] patients) method that returns the minimum, maximum, and average ages for the deceased and recovered patients, respectively, as strings.

The output format should be as follows (important for the automatic verification): result[0]="Deceased - Min: , Max: , Mean: "; result[1]="Recovered - Min: , Max: , Mean: "; Here is an example with specific values: result[0]="Deceased - Min: 12, Max: 80, Mean: 40.5" result[1]="Recovered - Min: 8, Max: 89, Mean: 45.31" Note: You can create a new string in a similar way to printing out information.

For example, if you print a line using System.out.println("The value of x is: " + x + "!"); instead, you can create a new String with that text like this: String output = "The value of x is" + x + "!";.

double[] ages = {20, 45, 69, 70, 45, 16, 59, 45, 24, 54, 53, 65, 61, 3, 48, 47, 13, 85, 27, 69, 45, 20, 67, 63, 18, 56, 25, 35, 35, 24, 70, 65, 34, 32, 23, 67, 53, 35, 33, 38, 22, 27, 69, 64, 36, 27, 51, 48, 46, 85, 38, 41, 24, 22, 73, 69, 23, 41, 32, 40, 65, 56, 47, 65, 70, 23, 65, 37, 63, 59, 26, 63, 69, 23, 24, 33, 35, 70, 36, 53, 35, 1, 60, 22, 18, 21, 21, 23, 70, 32, 38, 18, 74, 21, 20, 44, 38, 21, 42, 68, 29, 58, 1, 51, 45, 32, 34, 24, 48, 35, 26, 73, 75, 67, 67, 65, 44, 62, 75, 60, 1, 80, 72, 71, 65, 66, 55, 22, 50, 80, 50, 45};

char[] states = {'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'd', 'r', 'r', 'r', 'r ', 'r', 'r', 'r', 'r', 'r', 'r', 'd', 'r', 'r', 'r', 'r', 'd', 'r', 'r', 'r', 'd', 'r', 'r', 'd', 'r', 'r', 'r', 'r', 'r', 'r ', 'd', 'r', 'r', 'r', 'r', 'r', 'd', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'd', 'r', 'r', 'd', 'r', 'r', 'r', 'r', 'r', 'r', 'r ', 'r', 'r', 'r', 'd', 'r', 'r', 'd', 'r', 'd', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'd', 'r', 'r', 'd', 'r', 'r','r ', 'd', 'r', 'r', 'r', 'r', 'd', 'r', 'r', 'r', 'd', 'r', 'r', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd ', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd'};

plz i need an expert to solve it, I do not need the Indian People who use the AI to answer this question

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

More Books

Students also viewed these Databases questions

Question

Are all vectors the projection of some other vector into some line?

Answered: 1 week ago

Question

4. Describe the factors that influence self-disclosure

Answered: 1 week ago

Question

1. Explain key aspects of interpersonal relationships

Answered: 1 week ago