Example Report

Hi everybody,

I've copied an example of the program test report for assignment 9 below. Some of you had trouble getting your programs to work well. Please have a look at the output of this assignment. Please also let me know if you need an example implementation.

Other than the print outs provided by the programs, I will test three special cases.

  1. I will try to add an element with a parent that is not in the tree. I will add this code in the main method: tree.add("nobody", "orphan1"). I expect to see a corresponding error handling.

  2. I will try to add an element without specifying the parent. I will add something like this in the main method: tree.add(null, "orphan1"). The program should refuse this operation.

  3. I will try to print out a empty tree. I will add something like this in the main method: System.out.println(new FamilyTree()); The program should response that it is an empty tree.

If you submitted your assignment 9, you will soon receive an email from me with your report and score. If you haven't received the email by tomorrow, let me know. Also let me know if you have any questions regarding your score.

Cheers!
Jade


Here is your score for Assignment 9.

Score: TDB%

Let me know if you have any questions regarding your score. And let me know if you want a copy of an example implementation for the assignment.

Regards,
Jade

Grading Guildelines


Test Results

% java ChengJade9
Printing grandpa's family tree... grandpa +--- auntie | +--- cousin1 | | +--- nephew | +--- cousin2 +--- dad | +--- jade +--- uncle +--- cousin3 Printing grandma's family tree... grandma +--- auntie | +--- cousin1 +--- mom | +--- jade +--- uncle1 | +--- cousin2 | +--- cousin3 | +--- niece +--- uncle2 Adding "orphan1" to "nobody" in grandma's family tree... There is no matching parent 'nobody' to add child 'orphan1'. Adding "orphan2" to "null" in grandma's family tree... Cannot assign 'orphan2' as root because the root has already been assigned. Printing an empty tree... There are no people in this family tree.
Valid HTML 4.01 Valid CSS