public class MenuItem extends MenuComponent
Constructor and Description |
---|
MenuItem(java.lang.String name,
java.lang.String description,
boolean vegetarian,
double price) |
Modifier and Type | Method and Description |
---|---|
java.util.Iterator |
createIterator() |
java.lang.String |
getDescription() |
java.lang.String |
getName() |
double |
getPrice() |
boolean |
isVegetarian() |
void |
print() |
add, getChild, remove
public MenuItem(java.lang.String name, java.lang.String description, boolean vegetarian, double price)
public java.lang.String getName()
getName
in class MenuComponent
public java.lang.String getDescription()
getDescription
in class MenuComponent
public double getPrice()
getPrice
in class MenuComponent
public boolean isVegetarian()
isVegetarian
in class MenuComponent
public java.util.Iterator createIterator()
createIterator
in class MenuComponent
public void print()
print
in class MenuComponent