Ulam numbers (calculates your life expectancy if you want to)
This is a senseless use of objects.  What exactly is an UlamNumber object?  Consider how you might use this class:


 UlamNumber ulam = new UlamNumber(0);
 ulam.setNumber(20);
 ulam.ulamAlgorithm();    // ← prints something about your age
 ulam.getNumber();        // ← returns 1, not 20



That code tells you nothing about the task that it performs (if you ignore the comments).  In particular, ulamAlgorithm() does several things (count steps, compose a remark, and print it) — none of which is obvious from the name of the function.

What you want to write is

System.out.println(AgeCommenter.commentAbout(UlamSequence.countSteps(20)));


To make that happen:

public class UlamSequence {
    public static int countSteps(long number) {
        int steps;
        for (steps = 0; number &gt; 1; steps++) {
            number = (number % 2 == 0) ? number / 2
                                       : 3 * number + 1;
        }
        return steps;
    }
}


Note the use of the for-loop for counting.

And the AgeCommenter:

public class AgeCommenter {
    public static String commentAbout(int age) {
        String fmt =
            (age ==  1) ? "Unfortunately you will only become: %d year old &gt;:=)"
          : (age &lt; 100) ? "Unfortunately you will only become: %d years old =("
          :               "Congratulations, you will become %d years old =)";
        return String.format(fmt, age);
    }
}