Assignment #40

Code

    ///Name: Cody Swain
    ///Period: 6
    ///Project Name: Animation
    ///File Name: Animation.java
    ///Date: 10/15/15
    
    import java.util.Scanner;
     public class Animation
    {
    	public static void main( String[] args ) throws Exception
    	{
    		for ( int i=0; i<80; i++ )
    		{
    			if ( i%10 == 0 )
                {
                    System.out.print("><>        <>< ");
                    System.out.print("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
                }
                else if ( i%10 == 1 )
                {
                    System.out.print(" ><>      <><  ");
                    System.out.print("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
                }
                else if ( i%10 == 2 )
                {
    				System.out.print("  ><>    <><   ");
                    System.out.print("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
                }
                else if ( i%10 == 3 )
                {
    				System.out.print("   ><>  <><    ");
                    System.out.print("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
                }
                else if ( i%10 == 4 )
                {
    				System.out.print("    ><><><     ");
                    System.out.print("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
                }
                else if ( i%10 == 5 )
                {
    				System.out.print("    **!!**     ");
                    System.out.print("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
                }
                else if ( i%10 == 6 )
                {
                    System.out.print("     BOOM!     ");
                    System.out.print("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
                }
                else if ( i%10 == 6 )
                    System.out.print("       ~       ");
    
    
    
    			Thread.sleep(200);
    		}
    		
    	}
    }


        
    

Picture of the output

Assignment 40