Assignemnt #40
Code
/// Name: Holden Ganch
/// Period: 7
/// Program Name: fourtieth Program
/// File Name: Animation.java
/// Date Finished: 11/3/2015
public class Animation
{
public static void main( String[] args ) throws Exception
{
for ( int i=0; i<80; i++ )
{
if ( i%11 == 0 )
System.out.print(" Hi--_--_--_-- \r");
else if ( i%11 == 1 )
System.out.print(" -Hi--_--_--_-- \r");
else if ( i%11 == 2 )
System.out.print(" -_Hi_--_--_-- \r");
else if ( i%11 == 3 )
System.out.print(" -_-Hi--_--_-- \r");
else if ( i%11 == 4 )
System.out.print(" -_-_Hi_-_-_-_ \r");
else if ( i%11 == 5 )
System.out.print(" -_-_-Hi-_-_-_ \r");
else if ( i%11 == 6 )
System.out.print(" -_-_-_Hi_-_-_ \r");
else if ( i%11 == 7 )
System.out.print(" -_-_-_-Hi-_-_ \r");
else if ( i%11 == 8 )
System.out.print(" -_-_-_-_Hi_-_ \r");
else if ( i%11 == 9 )
System.out.print(" -_-_-_-_-Hi-_ \r");
else if ( i%11 == 10 )
System.out.print(" -_-_-_-_-_Hi_ \r");
else if ( i%11 == 11 )
System.out.print(" -_-_-_-_-_-Hi \r");
else if ( i%11 == 11 )
System.out.print(" Hi_-_-_-_-_-_ \r");
Thread.sleep(150);
}
}
}
Picture of the output