In-class lab 2

I. With your partner: write a program to convert a lowercase String (which should begin with a consonant followed by a vowel)  into its Pig Latin form.  
import java.io.*;
// PigLatin converts a String to its PigLatin form
// Written by:    Gwyneth Student and Hugh Eleve
// Precondition:  The initial word begins with a consonant
//                followed by a vowel and is lowercase
// Postcondition:   The PigLatin form places the beginning consonant
//                in UpperCase followed by "ay" at the end of the word
//                and displays the new word
// Restrictions:  The code must use the methods substring, toUppercase
//                and concat.
// Example:       "marylou" would display "arylouMay"

class PigLatin
{

   public static void main(String[ ] args)
 {
 
 
 

 }
}

II. Tell what would print given the following code:
import java.io.*;
class TestLength {
 public static void main(String [] args){
 
 String s1 = "antidisestablishmentarianism";
 String s2 = s1.substring(0,s1.length()-4);
 System.out.println(s2.length());
 System.out.println(s2.length()/2);
 System.out.println(s2);
 
 }
}