public class FertilizerData
extends java.lang.Object
| Constructor and Description |
|---|
FertilizerData() |
| Modifier and Type | Method and Description |
|---|---|
int |
getFertilizerData(java.lang.String region)
Gets the total amount of fertilizer used in a region
|
int |
getFertilizerData(java.lang.String region,
EnumFood food)
Gets the fertilizer data for a given name of a region
|
void |
setFertilizerData(java.lang.String region,
EnumFood food,
int value)
Sets fertilizer data based on the region name
|
java.lang.String |
toString() |
public void setFertilizerData(java.lang.String region,
EnumFood food,
int value)
region - name of the region to set the fertilizer forfood - type of food the fertilizer is forvalue - how much of the fertilizer is usedpublic int getFertilizerData(java.lang.String region,
EnumFood food)
region - name of a regionfood - type of foodpublic int getFertilizerData(java.lang.String region)
region - name of regionpublic java.lang.String toString()
toString in class java.lang.Object