Ahmed
02/22/2022, 12:33 PMclass Apartment ( val room1: String, val room2: String )
Joffrey
02/22/2022, 12:34 PMcopy(sourceFile: Path, targetFile: Path)
.
If they play symmetric roles, sometimes you can use a list instead. This is true in particular if all those properties are often processed/accessed together in the same way, because an iteration is usually easier to deal with than repeating the same code for each property. In the case of apartment rooms, maybe you're in this case (depends on the usage).