From d5cd53f9547c161ed7ef714ffb0b467502a32d97 Mon Sep 17 00:00:00 2001 From: Rhinemann Date: Thu, 8 Jun 2023 13:47:22 +0300 Subject: [PATCH] Lab 6, tweaks. --- Java/lab_6/Track.kt | 2 +- Java/lab_6/main.kt | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) 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