public void printChildren(ConsoleWriter cw) { foreach (Person p in children) { cw.writeLine(p.Info); } }
public void printUpperHierarchy(ConsoleWriter cw) { int indentation = cw.Indentation; if (parentOne != null) { cw.writeLine(parentOne.Info); cw.indent(); parentOne.printUpperHierarchy(cw); } if (parentTwo != null) { cw.Indentation = indentation; cw.writeLine(parentTwo.Info); cw.indent(); parentTwo.printUpperHierarchy(cw); } }