April 2018
Intermediate to advanced
396 pages
11h 8m
English
It is possible that in some cases, we would have to compose more complex traits, which extend other traits or classes. If a trait and no other trait up the inheritance chain extends a specific class explicitly, then things will be pretty simple and they don't change much. In this case, we would simply have access to the methods from the super traits. However, let's see what happens if any of the traits in the hierarchy extend a specific class. For the next example, we will be using the ConnectorWithHelper trait defined previously. This trait extends the abstract Connector class. Imagine that we want to have another really expensive smart watch, which can also connect to a database:
object ReallyExpensiveWatchUser ...
Read now
Unlock full access