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

305 B

Data Classes (#2)

Create an extension function called 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