UNB/ CS/ David Bremner/ teaching/ java/ ObjFact.java
public class ObjFact{
    private int n;
    private ObjFact child = null;
    public ObjFact(int the_n){
        n=the_n;
    }
    public int fact(){
        if (n<=1) {
            return 1;
        } else {
            child=new ObjFact(n-1);
            return n* child.fact();
        }
    }
    public static void main(String args[]){
        ObjFact obj=new ObjFact(10);
        System.out.println(obj.fact());
    }
}