in kotlin i create two class to save money data wi...
# announcements
a
in kotlin i create two class to save money data with currencies.
Copy code
data class Currency (val baseMoneySymbol: String, val baseMoneyName: String,
                     val moneyConversion: List<Money>, val date: String) {
    fun getSelectMoneyCurrency(selectMoney: String) : Money {
        moneyConversion.filter{
            (it.symbol == selectMoney)
        }.map {  return it}
        return Money(“”, 0.0)
    }

    fun size(): Int = moneyConversion.size

}

data class Money (val symbol: String, val currencyValue: Double)
The case is that I try to call the size function or the other within Currency and gives me the following error. “Error:(24, 20) Kotlin: Unresolved reference: size” How do I solve it? Thanks