Assignemnt #56 and Fortune Cookie

Code

  /// Name: Marco Correa
  /// Period: 5
  /// Program Name: Fortune Cookie
  /// File Name: FortuneCookie.java
  /// Date Finished: 11/30/2015

  
  import java.util.Random;

  public class FortuneCookie
  {
	  public static void main( String[] args )
	  {
		  Random r = new Random();
		
		  int lotto1 = 1 + r.nextInt(54);
		  int lotto2 = 1 + r.nextInt(54);
		  int lotto3 = 1 + r.nextInt(54);
		  int lotto4 = 1 + r.nextInt(54);
		  int lotto5 = 1 + r.nextInt(54);
		  int lotto6 = 1 + r.nextInt(54);
		
		  int fortune_val = 1 + r.nextInt(6);
		  String fortune_msg;
		
		  if ( fortune_val == 1 )
			  fortune_msg = "You are going to find lots of money in bed.";
		  else if ( fortune_val == 2 )
			  fortune_msg = "Don't sleep tonight!";
		  else if ( fortune_val == 3 )
			  fortune_msg = "Don't go outside today.";
		  else if ( fortune_val == 4 )
			  fortune_msg = "Listen to your mother.";
		  else if ( fortune_val == 5 )
			  fortune_msg = "Don't eat the hamburger.";
		  else if ( fortune_val == 6 )
			  fortune_msg = "Leave as fast as possible!";
		  else
			  fortune_msg = "You have no fortune...";
		
		  System.out.println( " Fortune cookie says: " + fortune_msg );
		  System.out.println( "\t" + lotto1 + " - " + lotto2 + " - " + lotto3 + " - " + lotto4 + " - " + lotto5 + " - " + lotto6 );
	  }
  }
    

Picture of the output

Assignment 56