Question: in java Complete the method named averagePrice, in the program below, named Prices.java, so that it accepts an array of prices as a parameter, and
in java
Complete the method named averagePrice, in the program below, named Prices.java, so that it accepts an array of prices as a parameter, and returns the average price. You may assume all prices are double values.
Complete the following file:
Prices.java
import java.util.Scanner; public class Prices { /** A method to determine and return the average price */ public static double averagePrice(double[] priceData) {
// your work here
} }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
