Alright, I have been working on a project for my cs class. Here are the specs:
http://www.cs.utsa.edu/~wagner/CS171.../project3.html
I have finished phase 2, but am not satisfied with the result. Here are the three files from the project created with JBuilder9:

ThreeHalvesTest.java
Code:
 package threehalves2pkg;
import cs1.*;

/**
 * 

Title: Three Halves Run</p>
 * 

Description: </p>
 * 

Copyright: Copyright (c) 2003</p>
 * 

Company: CS 1713.001</p>
 * @author Steven Beaullieu
 * @version 1.0
 */

public class ThreeHalvesTest {
  public static void main(String[] args){
    System.out.println("Project 3, Phase II: Longest run of any integer less than initial integer");
    System.out.print("Enter Integer ---> ");
    int n = Keyboard.readInt();
    ThreeHalves test = new ThreeHalves(n+1);
    ThreeHalvesRun[] test2;
    test2 = test.getRunsArray();
    ThreeHalvesRun test3 = (ThreeHalvesRun)findMax(test2);
    System.out.println(test3);

  }
  public static Comparable findMax(Comparable[] c){
    Comparable theMin = new ThreeHalvesRun(1);
    int i = 0;
    for(i=1;i<c.length;i++){
      if(theMin.compareTo(c[i])<0){
         theMin = c[i];
      }
      else{
        theMin = theMin;
      }
    }
    return theMin;

  }

}
ThreeHalvesRun.java
Code:
package threehalves2pkg;
import cs1.*;

/**
 * 

Title: Three Halves Run</p>
 * 

Description: </p>
 * 

Copyright: Copyright (c) 2003</p>
 * 

Company: CS 1713.001</p>
 * @author Steven Beaullieu
 * @version 1.0
 */

public class ThreeHalvesRun implements Comparable{
  private int myN, myRunLength, myMaxValue;

  public ThreeHalvesRun(int n){
    myN = n;
    myRunLength = 0;
    myMaxValue = n;
    run();
  }
  public void run(){
    int count2 = 1;
    int n = myN;
    int x = myN;
    while(myN != 1){
      if (myN % 2 == 1) {
        myN = (3 * myN + 1) / 2;
      }
      else {
        myN = myN / 2;
        if(myN == 1){
          count2++;break;
        }
      }
      count2++;
      if(myN > n){
        n = myN;
      }
    }
    myRunLength = count2;
    myMaxValue = n;
    myN = x;
  }
  public String runPrint(){
    int count = 1;
    int count2 = 1;
    int n = myN;
    int x = myN;
    String str = "";
    str = "\t"+myN + ", ";count++;
    while(myN != 1){
      if (myN % 2 == 1) {
        myN = (3 * myN + 1) / 2;
        str = str + myN + ", ";
        if(count == 10){
          str = str + "\n\t";
        }
      }
      else {
        myN = myN / 2;
        if(myN == 1){
          str = str + myN;
        }
        else{
          str = str + myN + ", ";
          if(count == 10)
            str = str + "\n\t";
        }
      }
      count++;
      if(count == 11){
        count = 1;
      }
      count2++;
      if(myN > n){
        n = myN;
      }
    }
    myRunLength = count2;
    myMaxValue = n;
    return str;

  }

  public String toString(){
    return "Initial integer: "+myN+", Length: "+myRunLength+
                       ", Maximum value: "+myMaxValue+"\n"+runPrint();
  }
  public int getRunLength(){
    return myRunLength;
  }
  public int compareTo(Object d){
    int otherValue = ((ThreeHalvesRun)d).getRunLength();
     if(myRunLength<otherValue)
       return -1;
     else if(myRunLength>otherValue)
       return 1;
     else
       return 0;

  }
}
ThreeHalves.java
Code:
package threehalves2pkg;

/**
 * 

Title: three halves run</p>
 * 

Description: </p>
 * 

Copyright: Copyright (c) 2003</p>
 * 

Company: CS 1713.001</p>
 * @author Steven Beaullieu
 * @version 1.0
 */

public class ThreeHalves {
  public ThreeHalvesRun[] runs;


  public ThreeHalves(int n){

    runs = new ThreeHalvesRun[n];
    for(int i=0;i<n;i++){
      if(i == 0)
        runs[i] = new ThreeHalvesRun(1);
      else
        runs[i] = new ThreeHalvesRun(i);
    }
  }

  public ThreeHalvesRun[] getRunsArray(){
    return runs;
  }
}
If you look at ThreeHavesTest.java there is a part like this
ThreeHalves test = new ThreeHalves(n+1);
on about the sixth line of the main part of the program. That is a little patch I put in. The program is supposed to take in a value and do all the little tests on it found in ThreeHalvesRun.java on it for every value up to the one you entered. So if you entered 500, it would do the tests from 1-500. When I didn't put the n+1 in the parenthesis and just had n, it would only go up to 499. I know that the program is probably fine how it is, but this is bugging me. I completely understand if no one replies to this because this project is a pain. What I want the program to do is take in the amount you enter without adding 1 to it and still do the same as if you did add one to it. When messing around with this with certain changes I would get indexoutofbounds errors. The whole point of the program is to check each run for every number up to the number you input and see which is the longest.
Here is the output I get with the patch:
Code:
Project 3, Phase II: Longest run of any integer less than initial integer
Enter Integer ---> 27
Initial integer: 27, Length: 71, Maximum value: 4616
	27, 41, 62, 31, 47, 71, 107, 161, 242, 121, 
	182, 91, 137, 206, 103, 155, 233, 350, 175, 263, 
	395, 593, 890, 445, 668, 334, 167, 251, 377, 566, 
	283, 425, 638, 319, 479, 719, 1079, 1619, 2429, 3644, 
	1822, 911, 1367, 2051, 3077, 4616, 2308, 1154, 577, 866, 
	433, 650, 325, 488, 244, 122, 61, 92, 46, 23, 
	35, 53, 80, 40, 20, 10, 5, 8, 4, 2, 
	1
Here is the output without the patch:
Code:
Project 3, Phase II: Longest run of any integer less than initial integer
Enter Integer ---> 27
Initial integer: 25, Length: 17, Maximum value: 44
	25, 38, 19, 29, 44, 22, 11, 17, 26, 13, 
	20, 10, 5, 8, 4, 2, 1
Don't kill yourself on this, I just thought maybe someone could fix it up a bit. It runs with the little patch just fine so if need be I will just leave it at that.
Thanks.