Hot coffee Cold Coffee
Let’s add method
serve to class
When we run the code then we get the message
This coffee is being served.
Some people want “hot” coffee and some people want “cold” coffee.
Now we are passing “condition” to
serve method so we need to make changes to
method to accept the type of coffee.
In this case method
serve takes one argument.
A method can also also take more than one argument as we will see in the next lesson.