diff --git a/Java/lab_6/Track.kt b/Java/lab_6/Track.kt index 70e0595..6854f22 100644 --- a/Java/lab_6/Track.kt +++ b/Java/lab_6/Track.kt @@ -12,4 +12,4 @@ open class Track(val numberInAlbum: Int, val trackName: String, val feature: Str "#${this.numberInAlbum}: ${this.trackName} ft. ${this.feature} (${this.duration})" } } -} \ No newline at end of file +} diff --git a/Java/lab_6/main.kt b/Java/lab_6/main.kt index 47fcb15..1d016fd 100644 --- a/Java/lab_6/main.kt +++ b/Java/lab_6/main.kt @@ -29,9 +29,7 @@ fun main() { println("$chromatica\n") - chromatica.tracks.sortBy { it.style } - - println("Album sorted by musical style:\n$chromatica\n") + println("${chromatica.albumName} tracks sorted by musical style:\n${chromatica.tracks.sortedBy { it.style }.joinToString("\n")}\n") val durationRange = 1.minutes.. 3.minutes + 30.seconds