Exercise: Converting and Creating a Measurement Unit
Explore how to use Kotlin extension functions and properties to convert User domain objects to UserJson clients and back. Understand transformation of email, date formats, and height measurements to create robust data transformations.
We'll cover the following...
We'll cover the following...
Problem statement
Implement two kinds of extension functions to facilitate smooth transformation between the User and UserJson classes. The User class represents our domain object, while UserJson represents the structure that is sent to the client.
Instructions
In the starting code, you’re provided with the basic ...