Class Weight

java.lang.Object
  extended by Weight
All Implemented Interfaces:
java.lang.Comparable<Weight>

public class Weight
extends java.lang.Object
implements java.lang.Comparable<Weight>


Field Summary
private  int myOunces
           
private  int myPounds
           
 
Constructor Summary
Weight()
           
Weight(int x)
           
Weight(int x, int y)
           
Weight(Weight arg)
           
 
Method Summary
 int compareTo(Weight w)
           
 int getOunces()
           
 int getPounds()
           
 void setOunces(int x)
           
 void setPounds(int x)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

myPounds

private int myPounds

myOunces

private int myOunces
Constructor Detail

Weight

public Weight()

Weight

public Weight(int x)

Weight

public Weight(int x,
              int y)

Weight

public Weight(Weight arg)
Method Detail

getPounds

public int getPounds()

getOunces

public int getOunces()

setPounds

public void setPounds(int x)

setOunces

public void setOunces(int x)

compareTo

public int compareTo(Weight w)
Specified by:
compareTo in interface java.lang.Comparable<Weight>

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object