The class tree works similar to a multi-way tree. The different is that you can initialise how many branches (degree) you want in the tree at the constructor level.
//This will create a node with degree of 4 and leaves are not initialised
//This will create a node with degree of 3, and each leave will be set
// to have 3 degree as well.
Nothing else from the class. If you understand a binary tree (always have 2 branches), it works similar to the binary tree but a lot more flexible to use.