This class implements a tail recursion method for calculating factorials.