/* Helene Martin, Garfield AP CS
	Short methods we parameterized to increase flexibility.
*/

public class ParameterTest {
	public static void main(String[] args) {
		double yearsOld = 30;
		// notice that yearsOld does not match the name of the formal parameter in the method header.  Java copies the value '30' into the local variable age in the method 
		printAge(yearsOld, 4);
		
		printTotalOwed(10, 20, .08);
	}
	
	public static void printAge(double age, int years) {
		System.out.println("Wow, " + age + " is very old!");
		System.out.println("In " + years + " years, you will be " + (age + years) + " years old.");
	}
	
	public static void printTotalOwed(int itemCount, double itemCost, double tax) {
		double subtotal = itemCount * itemCost;
		double total = subtotal * (tax + 1);
		
		System.out.println("You owe: $" + total); 
	}
}
