Question: In java Implement a public static String[] showMetrics(Patient[] patients) method that returns the minimum, maximum, and average ages for the deceased and recovered patients, respectively,

In java

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 + "!";.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!