Created node to exist.
This commit is contained in:
2
.idea/vcs.xml
generated
2
.idea/vcs.xml
generated
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -1,3 +1,27 @@
|
||||
public class RecipeNode
|
||||
{
|
||||
public class RecipeNode {
|
||||
private String ingredient; // Ingredient's name
|
||||
private double portion; // Portion size of ingredient
|
||||
RecipeNode pointer; // To point at parent node
|
||||
|
||||
// Accessors and Mutators for fields (Except pointer's)
|
||||
RecipeNode(String ingredient, double portion) {
|
||||
this.ingredient = ingredient;
|
||||
this.portion = portion;
|
||||
}
|
||||
|
||||
public void setIngredient(String ingredient) {
|
||||
this.ingredient = ingredient;
|
||||
}
|
||||
|
||||
public String getIngredient() {
|
||||
return ingredient;
|
||||
}
|
||||
|
||||
public void setPortion(double portion) {
|
||||
this.portion = portion;
|
||||
}
|
||||
|
||||
public double getPortion() {
|
||||
return portion;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user