Exercise: Converting and Creating a Measurement Unit
Enhance your Kotlin expertise by implementing extension functions for conversion between two classes and handling transformations of various data fields.
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 ...