/*
 * File: BlankClass.java
 * ---------------------
 * This class is a blank one that you can change at will. Remember, if you
 * change the class name, you'll need to change the filename so that it matches.
 */

import acm.program.*;

public class ParameterReturnExample extends ConsoleProgram {
	public void run() {
		double average = calculateAverage(5, 10);
		println("The average is: " + average);
	}
	
	/*
	 * This will calculate the average of two doubles and return the answer.
	 * Pre: Accepts two doubles as arguments
	 * Post: Return the average of two doubles
	 */
	private double calculateAverage(double num1, double num2){
		println("I can also do actions!");
		println("I also HAVE to return a double because that’s the method type!");

		double sum = num1 + num2;
		return sum / 2;
	}

}

