trait
are like interface
from other languages.
Have fun with it !
trait
allows you to describe what a class should look like.
You can implement functions that can be overridden. You can describe functions that have to be overridden.
New terms:
Several new keywords today:
extends
: is the keyword to be able to inherit from a classoverride
: tell that this element has been overridden.final
: tell that this cannot be overriddenprotected
: similar to private
but allow the child class to see this element. private
would not allow the child to see it.