Question: JAVA //5B// Implement a public static String[] showMetrics(ArtObject[] object) method that returns the minimum, maximum, and average prices for the sold and unsold art objects
JAVA
//5B//
Implement a public static String[] showMetrics(ArtObject[] object) method that returns the minimum, maximum, and average prices for the sold and unsold art objects as strings, respectively. The output format should be as follows (important for the automatic verification): result[0]="Sold - Min: , Max: , Mean: "; result[1]="Unsold - Min: , Max: , Mean: "; Here is an example with specific values: result[0]="Sold - Min: 1200, Max: 8000000, Mean: 500000"; result[1]="Unsold - Min: 50000, Max: 700000, Mean: 95000"; 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 + "!";.
char[] status = new char[] {'s', 's', 's', 'u', 'u', 'u', 's', 's', 'u', 'u', 'u', 'u', 's', 's', 'u', 's', 's', 's', 's', 'u', 'u', 's', 's', 's', 's', 'u', 's', 's', 'u', 'u', 's', 'u', 'u', 's', 's', 'u', 'u', 's', 's', 'u'};
double[] prices = new double[] {600, 6000, 1500, 1000, 1000, 1500, 2500, 1800, 1500, 400, 4000, 2000, 5000, 1000, 2000, 6000, 800, 1000, 1500, 1000, 1500, 500, 1500, 1500, 1500, 8000, 3000, 8000, 2500, 5000, 1500, 5000, 10000, 2000, 1500, 3500, 1500, 2500, 2500, 2500};
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
Get step-by-step solutions from verified subject matter experts
