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

291 B

Data Classes (#2)

Create an extension function transferTicket that copies an AirlineTicket object, replacing firstName and lastName with the new values during the copy:

fun AirlineTicket.transferTicket(
  otherFirstName: String, 
  otherLastName: String
): AirlineTicket