1
1
Fork 0
AtomicKotlinCourse/Usability/Data Classes/Exercise 2/task.md

11 lines
290 B
Markdown
Raw Normal View History

2019-11-07 16:01:16 +03:00
## Data Classes (#2)
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(
2019-11-13 20:32:55 +03:00
otherFirstName: String,
2019-11-07 16:01:16 +03:00
otherLastName: String
): AirlineTicket
```