Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update task.md #91

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions culinaryServer/culinaryServerCookSmoothie/task.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
The last recipe is a smoothie! Let's make a fruit smoothie with berries and oranges.
In this task we will make the `Smoothie` button live.
The last recipe is a smoothie! Let's make a delicious fruit smoothie with berries and oranges.
In this task, we'll make the `Smoothie` button live.

In this task it does not matter which of the collection we will use since we will use all the possible fruits.
Currently, it doesn't matter which collection we use since we'll be using all available fruits.
As an example, you will use a list to implement the functions, but you can try a sequence afterward.

In this task, you need to implement three functions in the `Smoothie.kt` file:

- `getFruitsForSmoothie`, which returns a list of fruits for the smoothie:
- `getFruitsForSmoothie` returns a list of fruits for the smoothie:

- gets baskets of all possible fruits (see `FruitType` and `FridgeImpl.getBasketOf`)
- put each basket in the kitchen (see `KitchenImpl.put`)
- take from each basket `capacity` number of fruits (see `KitchenImpl.put`) (see `KitchenImpl.takeFromBasket`)
- and finally sort fruits by the amount of sugar (`sugarContent`)
- Retrieve baskets of all available fruits (see `FruitType` and `FridgeImpl.getBasketOf`).
- Place each basket in the kitchen (see `KitchenImpl.put`).
- Take the specified `capacity` of fruits from each basket (see `KitchenImpl.put`) (see `KitchenImpl.takeFromBasket`).
- Finally, sort the fruits by their sugar content (`sugarContent`).

- `cookSmoothie` - which accepts a list of fruits for the smoothie and cook them:
- `cookSmoothie` accepts a list of fruits for the smoothie and cooks them:

- add each of them to the blender (see `BlenderImpl.add`)
- and blend them in the end (see `BlenderImpl.blend`)
- Add each fruit to the blender (see `BlenderImpl.add`).
- Blend the ingredients together (see `BlenderImpl.blend`).


<div class="hint" title="Click me to view the expected state of the application after completing this task">

![Current state](../../utils/src/main/resources/images/master/chef/states/smoothie.gif)

</div>
</div>
Loading