--- /dev/null
+public class Weight {
+ private int weight;
+
+ Weight(int weight) {
+ setWeight(weight);
+ }
+
+ public int getWeight() {
+ return weight;
+ }
+
+ public void setWeight(int weight) {
+ if (validateWeight(weight)) {
+ this.weight = weight;
+ } /* FIXME: raise an error */
+ }
+
+ private boolean validateWeight(int weight) {
+ return (weight > 0);
+ }
+}