public class Wedge
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private double |
percent
The percent of the pie that this wedge should occupy.
|
private java.lang.String |
text
The text describing this wedge.
|
Constructor and Description |
---|
Wedge(double percent,
java.lang.String text)
The constructor for this class that takes parameters for both fields.
|
Modifier and Type | Method and Description |
---|---|
double |
getPercent()
Accessor for percent.
|
java.lang.String |
getText()
Accessor for text.
|
void |
setPercent(double percent)
Mutator for percent.
|
void |
setText(java.lang.String text)
Mutator for text.
|
private double percent
private java.lang.String text
public Wedge(double percent, java.lang.String text)
percent
- The percent for the constructed wedge.text
- The text for the constructed wedge.public double getPercent()
public void setPercent(double percent)
percent
- The value to set in the percent field.public java.lang.String getText()
public void setText(java.lang.String text)
text
- The value to set in the text field.