Introduction to Streams
You will need to create your own project for this exercise.
Setup

Either recreate or copy your code from the Indian Dish Quiz from
OGP week 3. Ensure the ability to read the CSV file to
an ArrayList
of IndianDish
es.
Things to do with streams
- Create a list of dishes that are vegetarian.
- Create a list of dishes that have less than 500 calories.
- Create a list of dishes that are deserts.
- Create a list of dishes that use a certain ingredient.
- Convert the list of dishes to a list of dish names.
- Convert the list of dishes to a stream and print the names of all the dishes. (Hint: Use the Consumer interface.)
- Convert the list of dishes to a list of ingredients. (Preferably unique.)
Things to do with unittests
- Add
IllegalArgumentException
s to the constructor.
- Unittest that only legal data is accepted.
- Unittest that illegal values are rejected.
- Unittest that the refactored stream methods actually calculate the correct values.