/* 10/16/2019 * Review Lab 10: Void Methods Write a program with 2 methods: main, average Method average will accept an integer parameter numElts, which represents the number of data elements to be read in. The method should read in (from the keyboard) numElts numbers, and print their average. */ import java.util.Scanner; public class AverageMethod { /* main will call and methods and print msgs */ public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("How many elements will be processed? "); int numElts = sc.nextInt(); average(numElts, sc); // method call int y=10; increment(y); System.out.println("in main, y="+y); } /** average takes the average of a set of numbers * @param num the number of elements to read in */ public static void average(int num, Scanner keyboard) { double sum=0.0; for (int i=0; i