import java.util.Scanner;

public class MethodTesting {

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);	
		
		//call the writeName method by its name
		writeName();
		writeName();
		
		//call static methods using a class
		MethodTesting.writeName();
		
		//ask the user for two numbers (doubles)
		System.out.println("Enter two numbers: ");
		double n1 = input.nextDouble();
		double n2 = input.nextDouble();
		
		//call printOrderedPair
		printOrderedPair(n1, n2);
		//System.out.println(n1);
		printOrderedPair(1.2, -7.9);
		
		double total = addValues(n1, n2);
		System.out.println(total);
		
		System.out.println("Done");
	} //end main

	//create a method to print your name
	// method signature (first line)
	public static void writeName() {
		System.out.println("Clifton Presser");
	}
	
	
	//method to print two doubles as an ordered pair
	// need the two numbers: parameters
	// call them x and y in parens
	// return type: void (produces nothing)
	public static void printOrderedPair(double x, double y) {
		//x += 1;
		System.out.printf("( %.2f, %.2f )\n", x, y);
	}
	
	//return type: double (produces a double
	public static double addValues(double x, double y) {
		double sum = x + y;
		
		//produce the value: return the value
		return sum;
	}
	
}
