Scala supports object-oriented and functional styles of programming. Both of these programming paradigms have been proven to help model and solve real-world problems. In this section, we will explore both of these styles of programming using Scala.
In the object-oriented paradigm, you think in terms of objects and classes. A class can be thought of as a template that acts as a basis for creating objects of that type. For example, a Vehicle class can represent real-world automobiles with the following attributes:
- vin (a unique vehicle identification number)
A concrete instance of...