Summary
This chapter was more exciting. We learnt about inheritance in Scala and discussed composition and inheritance. It's really going to help us when we take design decisions about our implementation. Then we learnt about this amazing construct named traits and we tried various ways of using traits. Then we learnt about the concept of linearization which it helped us understand how super calls are resolved. Then we talked about packaging and importing which was exciting as Scala provides different ways to use them. Finally, we learnt about visibility rules and sealed traits. And after going through all these concepts, we can say with confidence that we now understand the object-oriented concepts in Scala. So, it's time for us to do some real functional programming. In the next few chapters our focus will be on using functions in Scala.