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:
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
Get step-by-step solutions from verified subject matter experts
