title: creating a random list of coins from a repository
body: <p>I'm trying to build a simple app that would display a coin collection for each user I type into a textfield. The coin collection would have to be unique to each user. I already have the repository for the coins. How do I generate a new random coin collection for each user? Each collection could have multiple coins of the same value but with different years.</p>
  <pre><code>object CoinRepository {
  
  fun getCoinCollection(): List&lt;Coin&gt; {
      return listOf(
          Coin(
              id = 1,
              name = &quot;Penny&quot;,
              year = (1900..2022).random()
          ),
          Coin(
              id = 2,
              name = &quot;Nickel&quot;,
              year = (1900..2022).random()
          ),
          Coin(
              id = 3,
              name = &quot;Dime&quot;,
              year = (1900..2022).random()
          ),
          Coin(
              id = 4,
              name = &quot;Quarter&quot;,
              year = (1900..2022).random()
          ),
          Coin(
              id = 5,
              name = &quot;Dollar&quot;,
              year = (1900..2022).random()
          )
      )
  }
  </code></pre>
  <p>}</p>
  <pre><code>data class Coin(
  val id: Int,
  val name: String,
  val year: Int
  </code></pre>
  <p>)</p>