Int Tree Sum Assignment
Jump to navigation
Jump to search
Contents
Code To Implement
IntTree
| class: | IntTree.java | |
| methods: | sum() | |
| package: | inttree.group | |
| source folder: | student/src/main/java |
sum
method: public int sum()
(sequential implementation only)
Testing Your Solution
Client
| class: | IntTreeSumClient.java | CLIENT |
| package: | inttree.client | |
| source folder: | student/src/main/java |
IntTree intTree = new IntTree(1, new IntTree(2), new IntTree(3), new IntTree(100, new IntTree(231), new IntTree(425)), new IntTree(4)); int sum = intTree.sum(); System.out.println(sum);
should produce the output:
766
Correctness
| class: | _IntTreeSumTestSuite.java | |
| package: | inttree.group | |
| source folder: | testing/src/test/java |