// *************************************************************
// Name:         Mohamed Aboutabl
// Date:         10/19/2004
// Assignment:   Lab 17: EightBall.java
//
// *************************************************************
// References & Acknowledgements: I received no outside help
//
// *************************************************************
// Name of the class:	EightBall
// Purpose of the class: Demonstrate the use of switch statement
// *************************************************************

import cs1.Keyboard ;

public class EightBall
{
	/**----------------------------------------------------------
	// Test the use of if-else
	// --------------------------------------------------------*/
	public static void main( String[] args)
	{
		// Variables Declarations
		String question ;
		int randNum ;
		
		// Ask then echo the question from the user
		System.out.print("What is your question today? ") ;
		question = Keyboard.readString() ;
		System.out.println("You asked: " + question ) ;
		
		// Now respond with a randomly chosen answer
		randNum = (int) (Math.random() * 10 ) ;
		switch ( randNum )
		{
			case 0 :
					System.out.println("Outlook Good");
					break ;
					
			case 1 :
					System.out.println("Outlook Not So Good");
					break ;
					
			case 2 :
					System.out.println("My Reply Is No");
					break ;
					
			case 3 :
					System.out.println("Don't Count On It");
					break ;
					
			case 4 :
					System.out.println("You May Rely On It");
					break ;
					
			case 5 :
					System.out.println("Ask Again Later");
					break ;
					
			case 6 :
					System.out.println("Most Likely");
					break ;
					
			case 7 :
					System.out.println("Cannot Predict Now");
					break ;
					
			case 8 :
					System.out.println("Yes");
					break ;
					
			case 9 :
					System.out.println("Yes Definitely");
					break ;
			
			default :
					System.out.println("I'm sorry, I don't know the answer to that question.");
		
		
		}
		
	}
	
}