meal-sample.kt

Home   »   meal-sample.kt

enum class Drink {
    WATER,
    COFFEE,
    TEA,
    NATURAL_JUICE,
    SODA
}

sealed class Meal {
    ...
    data class Breakfast(val eggs: Boolean, val bacon: Boolean, val breadSlices: Int, val drink: Drink): Meal()
    ...
}

Leave a Reply

Your email address will not be published. Required fields are marked *