Now that you know the basics of functions in Scala, you’ll learn about classes in this lesson. The concept of class is fundamental to the object-oriented paradigm, and it allows you to represent elements and interactions from the real world. Classes, subclasses, and abstract classes enable you to group entities that have common shapes and behaviors. If you are familiar with other object-oriented programming languages, you’ll find similarities with Scala’s concept of class. Table 7.1 recaps the different types of classes Scala can offer. In the capstone, you’ll use a class to represent your vending machine.
Table 7.1 Summary of the types of classes in Scala, which match the definitions of most other object-oriented languages