public class A { // attribute private int value; // default constructor: set the object's value to 0 // specific constructor: set the object's value to n // getValue(): returns the object's value // setValue(): takes a single parameter of type int. Sets the object's // value to the value of the parameter // equals(): takes a single paramteter of type A. Returns whether the // object has the same value as the other object // isPositive(): reports whether the object's value is at least 0 // zero(): causes the object's value to be set to 0 // add(): takes a single parameter of type A. Returns a new object whose // value is the sum of the two object's values // toString(): returns a representation of the object public String toString() { String representation = "A(" + value + ")"; return representation; } }