import java.util.Scanner;

class Sep27 {
	public static void main(String[] args) {

		Scanner kb = new Scanner(System.in);

		// Call the method named printCourseName

		printCourseName();
		printCourseName();
		printCourseName();
	
		int ten = 0;
		ten = returnTen();

		System.out.println("ten: " + ten);

		int ten2 = returnTen2();
		System.out.println("ten: " + ten2);
			
		System.out.println("ten: " + returnTen2());

		// Get an integer from the user, and pass the value
		// to the decrement method.

		System.out.println("Please enter an integer");
		int num = kb.nextInt();
		
		int oneLess = decrement(num);
		System.out.println("value in oneLess: " + oneLess);
	
		System.out.println("Please enter an integer again");
		num = kb.nextInt();
		
		oneLess = decrement(num);
		System.out.println("value in oneLess: " + oneLess);

		int sum = add(num, oneLess);
		System.out.println("sum: " + sum);

		int choice = printMenu(kb);

		// do something with choice

		System.out.println("finished with main");
	}

	/*
	 * Method are declared in a class, but outside any
	 * other methods in the class.
	 */

	static void printCourseName() {
		System.out.println("CSCI-101 Programming I");
	}

	/* 
	 * Create local variable named x (only accessible inside method)
	 * return the value in x.
	 */

	static int returnTen() {
		int x = 10;
		return x;
	}

	static int returnTen2() {
		return 10;
	}

	/*
	 * Create a method named decrement that takes in an integer
	 * and return one less than the value that is passed in
	 */

	static int decrement(int x) {
		return (x - 1);
	}

	/* create a method named add that has two integer parameters
	 * and returns the sum of the values in the parameters
	 */

	static int add(int x, int y) {
		int z = x + y;
		return z;
	}

	/*
	 * Create a method named printMenu that returns the choice 
	 * entered by the user
	 */

	static int printMenu(Scanner scanner) {
		System.out.println("[1] add");
		System.out.println("[2] decrement");
		System.out.println("[3] exit");
		System.out.print("Please enter a menu option: ");

		int choice = scanner.nextInt();
		return choice;
	}

}

// end of file
