1.1 --- a/tests/Value.java Tue Nov 09 18:52:38 2004 +0100
1.2 +++ b/tests/Value.java Tue Nov 09 19:49:04 2004 +0100
1.3 @@ -12,6 +12,24 @@
1.4 public void setValue(int value) {
1.5 this.value = value;
1.6 }
1.7 +
1.8 + public boolean isPositive() {
1.9 + return this.value > 0;
1.10 + }
1.11 +
1.12 + public int compare(int value) {
1.13 + if (value < this.value) {
1.14 + return -1;
1.15 + } else if (value == this.value) {
1.16 + return 0;
1.17 + } else {
1.18 + return 1;
1.19 + }
1.20 + }
1.21 +
1.22 + public int add(int value) {
1.23 + return this.value + value;
1.24 + }
1.25 }
1.26
1.27 // vim: tabstop=4 expandtab shiftwidth=4