Unit 1. The Basics
In Unit 0, you installed everything you need to start coding in Scala. In this unit, you’ll begin writing Scala code. You’ll learn how to program a vending machine in Scala using the same OOP principles already familiar to you. In particular, we will discuss the following subjects:
-
Lesson 4 illustrates the difference between values and variables and the clear separation between mutable and immutable assignments.
-
Lesson 5 introduces conditional constructs to control the execution flow of our program. You’ll learn about loops to repeat the same operation multiple times.
-
Lesson 6 shows you how to define functions in Scala.
-
Lesson 7 demonstrates how to use classes to represent interactions between elements. You’ll learn ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access