-
-
Save 5AbhishekSaxena/0e4ed25fde72519d0e5e53675596bb01 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User { | |
private val firstName: String | |
private val lastName: String | |
private val address: Address | |
private val educations: List<Education> | |
constructor( | |
firstName: String, | |
lastName: String, | |
address: Address, | |
educations: List<Education> | |
) { | |
this.firstName = firstName | |
this.lastName = lastName | |
this.address = address | |
this.educations = educations | |
} | |
constructor( | |
firstName: String, | |
middleName: String, | |
lastName: String, | |
address: Address, | |
educations: List<Education> | |
) : this(firstName, lastName, address, educations) { | |
this.middleName = middleName | |
} | |
constructor( | |
firstName: String, | |
lastName: String, | |
address: Address, | |
company: Company?, | |
educations: List<Education> | |
) : this(firstName, lastName, address, educations) { | |
this.company = company | |
} | |
constructor( | |
firstName: String, | |
lastName: String, | |
address: Address, | |
contact: Contact?, | |
educations: List<Education> | |
) : this(firstName, lastName, address, educations) { | |
this.contact = contact | |
} | |
constructor( | |
firstName: String, | |
middleName: String, | |
lastName: String, | |
address: Address, | |
contact: Contact, | |
company: Company, | |
educations: List<Education>, | |
) : this(firstName, middleName, lastName, address, educations) { | |
this.contact = contact | |
this.company = company | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment