Can recipes be considered as programs?Is a recipe really an algorithm to solve a problem? Programming uses
Question:
Can recipes be considered as programs?Is a recipe really an algorithm to solve a problem? Programming uses sequential, iterative, anddecision logic to implement an algorithm. Are those three types of logic sufficient to produce theresult of a recipe? The application of an algorithm in various environments can be the real challenge.Systems people call those Use Cases.Tea is the most popular drink on the planet. The algorithm/computer/robot must distinguish betweenmaking tea, drinking tea, and the phrase "Let's have tea" which usually means both."Hey robot, make tea." — "Tea is made by the Camellia Sinensis plant. I'm a robot.""Hey robot, make me a cup of tea." — "It is impossible to make a cup from tea.""Hey robot, let's have tea." — "You already have tea. It's in the cupboard. Or in the Roman alphabetbetween S and U." And stop waking me while I'm recharging."Assume there is a selection of different kinds of tea available for making tea."Put tea into a pot or cup, add H2O at 100°C until level is 15mm from rim".It sounds simple but does all tea require 100°C H2O? How much tea relative to water and what are the units of measure? How long should the tea steep? Should the tea leaves be left in the pot/cup orremoved after steeping? How would you make tea in your kitchen, at Seneca, camping in thewilderness during summer or the depths of winter, on the International Space Station? Is there an algorithm to make any kind of tea...anywhere...under any conditions?
1. Start
2. Switch ON the Nespresso Coffee machine.
3. Coffee Capsule Selection:
3.1 Pick the Golden Caramel Coffee Capsule from the jar.
4. Set up the Nespresso Coffee Maker:
4.1 Open the Coffee capsule compartment.
4.2 Place the selected Golden Caramel capsule in the compartment.
5. Fill in water to the water tank of the Nespresso machine.
6. Place the Mug:
6.1 Place the black mug under the coffee dispenser.
7. Adjust the Settings on the Coffee Maker:
7.1 Press the "coffee mug" icon on the Nespresso coffee maker.
8. Hold on for the Nespresso machine to initiate and complete the brewing process.
9. Discard the coffee capsule:
9.1 Open the coffee capsule Compartment and wait for the machine to automatically discard the coffee capsule.
10. Close the coffee capsule compartment of the Nespresso machine.
10.1 Add 2 cubes of Sugar to the brewed coffee.
11. Stir the coffee until it's evenly mixed.
12. The Golden Caramel flavored Coffee is ready to drink.
13. Switch OFF the Nespresso coffee maker.
14. End
Write with reference to the pseudocode in 250+ words
Data Structures and Algorithm Analysis in Java
ISBN: 978-0132576277
3rd edition
Authors: Mark A. Weiss