Sometimes, we want to reuse values from an existing instance. The copy() method lets us create new instances of a data class, overriding the parameters that we want:
val myItem = Item(myAlmondCupcake, 0.40, 5)
val mySecondItem = myItem.copy(product = myCaramelCupcake) //named parameter
In this case, mySecondItem copies unitPrice and quantity from myItem, and replaces the product property.