- Demonstrate your ability to program using interfaces and inner classes in the Java programming language.
- There are two tasks to complete
- Become a five-star restaurant chef!
- Finish Chef as detailed by its comments
- Use anonymous classes to implement Timer when set by the Chef while using her Oven
- All implementations of Recipe need the
Oven
to be made.- Make an implementation of Recipe for RoastedSweetPotato which takes 1/10th the
Oven
temperature in minutes (e.g. if theOven
temperature is 300 then it takes 30 minutes to make theRoastedSweetPotato
)- It's food's volume is 6,000 cubic inches
- Make an implementation of Recipe for PotRoast which takes 1/5th the
Oven
temperature in minutes (e.g. if theOven
temperature is 300 then it takes 60 minutes to make thePotRoast
)- It's food's volume is 10,000 cubic inches
- Make an implementation of Recipe for Baguette which takes time exponentially proportional (i.e. exponential decay) to the
Oven
temperature in minutes. The rate is passed into the recipe's constructor. (e.g. if theOven
temperature is 300, the constant is 0.5 then it takes ~20 minutes to make theBaguette
); see wiki. Note, making a perfect French baguette is tricky as there's not an exact time but something close enough to done.- It's food's volume is 2,000 cubic inches
- Make an implementation of Recipe for RoastedSweetPotato which takes 1/10th the
- The
Chef
should make onePotRoast
, oneBaguette
, oneRoastedSweetPotato
and secondBaguette
in that order. - The
Oven
's initial temperature should be300
- Note, to become a five-star chef takes high precision when cooking. Unfortunately the
Oven
isn't perfectly calibrated and so the temperature set often fluctuates. - Note, every great chef has a great sous-chef. Use your SousChef wisely!
- Note, you need not (and must not) use
Thread
/synchronized
or any other concurrency pattern for this assignment. They exist within the provided code but you will not need to program them yourself (this assignment can be done 100% with things we've already learned in lecture).
- Fix the leaky kitchen Faucet such that you eliminate the inner class leak.
- Become a five-star restaurant chef!
- Ensure your code is correct by compiling and testing it
- A portion of your grade will be based upon readability and organization of your code.
- Follow the naming guidelines of lecture
- Break large functions into multiple functions based on logical organizations