Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

What\'s the problem here? B El Task List E MS3339 38 public static void average

ID: 3596433 • Letter: W

Question

What's the problem here?

B El Task List E MS3339 38 public static void average (Arraylist Double> stock) [ 39 All Activate JRE System Librar double average 0; Stock-lava | 42 for (Double stocks : stock) { 43 45 47 average stocks average stock.sizeO; System.out.printlnC The average closing price nas:NumberFormat.getcurrencyInstance). format(average)); 50 51 52e public static void maximum (ArrayList stock) Connect Mylyn Connect to your task and ALM tools or create a local t double naxinum stock.get() 56 for CDouble stocks stock); 57 if (stocks maximum) maximum-stocks: a Stock , addStock(ArrayList«Double») : void average(ArrayListO 970 s.oddStock(stock): s,average(stock); s maximunstack); 71 73 75 Declaration console Problems Javadoc Stock [Java Application] LibraryJavaJavavirtualMachinesk1.8.0144Jdk/Contents/Home/oin java (Oct 19, 2017, 7:14:24 PM Updates Available Please enter a stock's closing price as a decimal value (e.g. 12.45, enter 99.99 to exit: 9.99 The average closing price was: $45.00 Exception in thread nain" java.lang.Error: Unresolved conpilation problens: Updates are avallable for your software. Click to review and Install updates, Set up Reminder options stocks cannot be resolved to a variable stocks cannot be resolved to a variable at HN4.Stock.naximun(Stock java:58) at HN4.Stock.moin(Stock iave:72) Smart Insert 60: 6

Explanation / Answer

Hi

I find the error in the code. Please remove the semicolon at the end of for loop.

It is at the line nuumber in your code screen shot is 56.

Please remove semicolon after for loop.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote