Uses setter and getter methods to set and get members for tree.