|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Tree
Class Tree This class define the Tree objects used within the 15-111/200 Mastery Exam/Fall 2002 Students are not permitted to modify or augment this class in any way. This file must not change. You are not required to understand the implementation of these methods. But, it will likely be useful for you to understand what they can accomplish for you. Exam for 15-111/200 Fall 2002
Constructor Summary | |
Tree(int heightInFeet,
double priceInDollarsAndCents,
int qualityFrom1Through10)
This is the constructor of a Tree. |
Method Summary | |
int |
compareTo(java.lang.Object anotherTree)
This compares two trees based on their overall value to the buyer |
int |
getHeightInFeet()
This is returns the recorded hieght of the Tree in whole feet |
double |
getPriceInDollarsAndCents()
This is returns the selling price of the Tree |
int |
getQualityFrom1Through10()
This is returns the quality of the Tree |
int |
getValue()
This calculate the "value" of the Tree to the buyer. |
java.lang.String |
toString()
Returns a String representation of a Tree including all fields |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public Tree(int heightInFeet, double priceInDollarsAndCents, int qualityFrom1Through10)
Method Detail |
public int getHeightInFeet()
public double getPriceInDollarsAndCents()
public int getQualityFrom1Through10()
public int getValue()
public int compareTo(java.lang.Object anotherTree)
public java.lang.String toString()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |