Class Weight

java.lang.Object
  extended by Weight

public class Weight
extends java.lang.Object


Constructor Summary
Weight()
           
Weight(double wgtInGram)
           
Weight(int lb, int oz)
           
 
Method Summary
 void adjust(double amount)
          Increase the weight.
 void adjust(int lb, int oz)
          Increase the pounds and ounces of the weight.
 double getGram()
           
 int getOunce()
           
 int getPound()
           
 void setGram(double amount)
           
 void setOunce(int oz)
          Set the ounces portion of the weight, keeping the pounds constant.
 void setPound(int lb)
          Set the pound portion of the weight, keeping the ounces constant.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Weight

public Weight()

Weight

public Weight(int lb,
              int oz)

Weight

public Weight(double wgtInGram)
Method Detail

adjust

public void adjust(double amount)
Increase the weight.

Parameters:
amount - The amount in grams by which to increase the weight.

adjust

public void adjust(int lb,
                   int oz)
Increase the pounds and ounces of the weight.

Parameters:
lb - The amount of pounds by which to increase the weight.
oz - The number of ounces by which to increase the weight.

getGram

public double getGram()

getPound

public int getPound()

getOunce

public int getOunce()

setGram

public void setGram(double amount)

setPound

public void setPound(int lb)
Set the pound portion of the weight, keeping the ounces constant.


setOunce

public void setOunce(int oz)
Set the ounces portion of the weight, keeping the pounds constant.