import java.util.Scanner;

public class MethodTesting {

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		
		//call the writeName
		writeName();
		writeName();
		// call using the class name
		MethodTesting.writeName();
		
		//read two numbers from the user
		System.out.println("Enter two numbers: ");
		double n1 = input.nextDouble();
		double n2 = input.nextDouble();
		
		printOrderedPair(n1, n2);
		printOrderedPair(0.5, -8.9);
		
		//call addValues with n1 and n2 as parameters
		double sum = addValues(n1, n2);
		System.out.println(sum);
		
		System.out.println("Done");
	} //end main
	
	//define method to print my name
	// first line: header or signature
	public static void writeName() {
		//method body
		System.out.println("Clifton Presser");
	}
	
	//print two double values as an ordered pair
	//numbers will be parameters, defined in ()
	//return type: void (nothing)
	public static void printOrderedPair(double x, double y) {
		System.out.printf("( %.2f, %.2f)\n", x, y);
	}
	
	//method to add two numbers and return their sum
	//parameters: two numbers
	//return value is the sum
	//return type
	public static double addValues(double x, double y) {
		double result = x + y;
		//return statement
		return result;
	}
}
