|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectWeight
public class Weight
| 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 |
|---|
public Weight()
public Weight(int lb,
int oz)
public Weight(double wgtInGram)
| Method Detail |
|---|
public void adjust(double amount)
amount - The amount in grams by which to increase the weight.
public void adjust(int lb,
int oz)
lb - The amount of pounds by which to increase the weight.oz - The number of ounces by which to increase the weight.public double getGram()
public int getPound()
public int getOunce()
public void setGram(double amount)
public void setPound(int lb)
public void setOunce(int oz)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||