//ThisOldMan.java class ThisOldMan { public static void main(String[] agrs) { for(int i = 1; i < 11; i++){ System.out.print("\nThis old man, he played "); System.out.print(i); System.out.print(","); System.out.print("\nHe played knick knack "); switch(i){ case 1: System.out.print("with his thumb;\n");break; case 2: System.out.print("with my shoe;\n");break; case 3: System.out.print("on my knee;\n");break; case 4: System.out.print("at my door;\n");break; case 5: System.out.print("jazz and jive;\n");break; case 6: System.out.print("with his sticks;\n");break; case 7: System.out.print("with his pen;\n");break; case 8: System.out.print("on my gate;\n");break; case 9: System.out.print("rise and shine;\n");break; case 10: System.out.print("in my den;\n");break; default: System.out.print("on my bureau;\n");break; } System.out.println("With a Knick, knack, paddy whack,"); System.out.println("Give the dog a bone"); System.out.println("This old man came rolling home."); } } }