2019-11-07 16:01:16 +03:00
|
|
|
## Data Classes (#2)
|
2019-07-15 17:01:04 +03:00
|
|
|
|
2019-11-07 16:01:16 +03:00
|
|
|
Create an extension function `transferTicket` that copies an `AirlineTicket`
|
|
|
|
object, replacing `firstName` and `lastName` with the new values during the copy:
|
2019-11-07 15:34:33 +03:00
|
|
|
|
2019-11-07 16:01:16 +03:00
|
|
|
```
|
|
|
|
fun AirlineTicket.transferTicket(
|
|
|
|
otherFirstName: String,
|
|
|
|
otherLastName: String
|
|
|
|
): AirlineTicket
|
|
|
|
```
|