In the previous unit, you mastered how to create a simple HTTP server. In this lesson, you’ll discover an essential tool in your Scala’s toolbox called case class. When coding, dealing with data is a fundamental and recurring task. A case class provides a convenient and efficient way to represent your data in an immutable way that allows you to share data between multiple threads safely. Being able to express data efficiently and conveniently is essential to make sure our program works correctly. You’ll also learn about case objects and how they can be useful when serialization is involved. Finally, you’ll see how pattern matching provides dedicated support for case classes thanks to the unapply
function. In the capstone, you’ll use case classes and case objects to represent the core elements of the game “Paper, Rock, Scissors, Lizard, Spock!”