Skip to content

Commit

Permalink
Update task.md
Browse files Browse the repository at this point in the history
language checked
  • Loading branch information
stephen-hero authored Oct 29, 2024
1 parent 64dc6c5 commit 808348a
Showing 1 changed file with 12 additions and 12 deletions.
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>

0 comments on commit 808348a

Please sign in to comment.