Food
JavaScript is disabled on your browser.
Skip navigation links
Package
Class
Tree
Deprecated
Index
Help
All Classes
SEARCH:
JavaScript is disabled on your browser.
Summary:
Nested |
Field |
Constr |
Method
Detail:
Field |
Constr |
Method
Interface Food
All Known Implementing Classes:
AbstractFood, Fries, Potato
public interface Food
This class models a food item that may be cooked
Food will cook at a particular temperature for a particular amount of time. Food will
burn if it is exposed to a higher temperature, OR for a longer time.
Food has no memory of previous time spent cooking – the burn time must occur in one go
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
void cook(int temperature,
int duration)
Cook this food item by applying heat for a time, potentially changing its state
Method Detail
cook
void cook(int temperature,
int duration)
Cook this food item by applying heat for a time, potentially changing its state
Parameters:
temperature – The (constant) temperature to cook at in degrees Celsius
duration – The length of time in minutes to cook the food
Skip navigation links
Package
Class
Tree
Deprecated
Index
Help
All Classes
JavaScript is disabled on your browser.
Summary:
Nested |
Field |
Constr |
Method
Detail:
Field |
Constr |
Method