/** This class will represent monetary values */
public class Money {
    /** Count of the base unit of the currency */
    private long value;

    /** Constructor:  initialize to specified amount */
    public Money(long dollars, int cents) {
        value = 100*dollars+cents;
    }

    /** Constructor:  initialize to zero */
    public Money() {
        value = 0;
    }

    /** Copy constructor */
    public Money(Money m) {
        value = m.value;
    }

    /** Accessor */
    public long getDollars() {
        return value/100;
    }
 
    /** Accessor */
    public int getCents() {
        return value%100;
    }

    /** Manipulator */
    public void setDollarsAndCents(long dollars, int cents) {
        value = 100*dollars+cents;
    }

}