Assignemnt #51 Alphabetical Order

Code

    Name: Iaroslav Titov
    Period: 7
    Project Name: AlphOrder
    File Name: AlphOrder.java
    Date: 10/21/2015
    
import java.util.Scanner;

       public class AlphOrder
	   {
		   public static void main(String[] args)
		   {
			   Scanner keyboard = new Scanner(System.in);

			   System.out.print("Enter your last name: ");
			   String lName = keyboard.next();

			     if (lName.compareTo("Carswell")<=0) System.out.println("You don't have to wait long.");
				 else if (lName.compareTo("Jones")<=0) System.out.println("That's not bad.");
				 else if (lName.compareTo("Smith")<=0) System.out.println("It looks like a bit of wait.");
				 else if (lName.compareTo("Young")<=0) System.out.println("It's going to take a while.");
				 else System.out.println("You aren't going anywhere for a while.");
		   }
	   }

    

Picture of the output

Assignment 48