I have to you’ll create an array of 20 values in dollars and cents format ($1.59). Then create four separate methods within the program to complete the listed tasks. The first method should create a total of all of the values listed in the array. The second should search the array, and return a listing of all values that are less than $5.00. The third should return the average of the values in the array. (Use the output from the first method.) Finally, display a list of all values in the array that are greater than the average value.
I keep getting these errors : ----jGRASP exec: javac -g Prices.java
Prices.java:3: missing method body, or declare abstract
public static void main(String args);
Prices.java:32: operator + cannot be applied to double,double
Prices.java:41: operator < cannot be applied to double,double
if (prices < 5.00);
Prices.java:46: incompatible types
found : int
if (i / 20)
Prices.java:50: operator > cannot be applied to double,double
if (prices > average)
----jGRASP wedge2: exit code for process is 1.
----jGRASP: operation complete. Prices.java
public static void main(String args); <--- should not have semicolon in the end of this line
The rest of the errors after such error - you don;t need to look at - verything is screwed up - recompile again