/** This program is intended to be used with the book "Java 6 -- What Do You Want To Do?"
 * by Steven P. Warr and is distributed free of charge and without and expectations of remuneration.
 * Chapter BAS   NOTE all programs begin with the title of the chapter in which
 * they are intended to be used.   Copyright 2008 Steven P. Warr All rights reserved
 */

import java.util.*;  		//needed for Scanner
public class Bas07
{
	public static void main(String[ ] args)
		{
			String name1 = "Sally", name2 = "John";
			if(name1.equals(name2))
				System.out.println("the names are the same");
			else
				System.out.println("the names are different");
			if (name1.compareTo(name2) > 0)
					System.out.println(name1 + " is after " + name2 + " alphabetically.");
				else
			if (name1.compareTo(name2) < 0)
					System.out.println(name1 + " is before" + name2 + " alphabetically.");
			else
					System.out.println("The names are the same.");

			Scanner input = new Scanner(System.in);
			int num = 0;
			System.out.println("enter a number between 1 and 3");
			num = input.nextInt( );		
			switch (num)
				{
					case 1:System.out.println("One is the loneliest number");
						break;   //   makes it mutually exclusive
					case 2:System.out.println("Two is for tea.");
						break;   
					case 3:System.out.println("Three is a crowd.");
						break;   
					default :System.out.println("You were told 1-3!");
				}
		}
			
}
