Complete the code to declare an enum class named Direction.
enum class [1] { NORTH, SOUTH, EAST, WEST }
The enum class name should be Direction with capital D as per Kotlin naming conventions.
Complete the code to access the enum constant EAST from Direction.
val dir = Direction.[1]Enum constants in Kotlin are uppercase by convention, so EAST is correct.
Fix the error in the enum class declaration by completing the blank.
enum [1] Direction {
NORTH, SOUTH, EAST, WEST
}The correct syntax to declare an enum class in Kotlin is enum class.
Fill both blanks to declare an enum class Color with constants RED and BLUE.
enum [1] [2] { RED, BLUE }
object instead of classThe correct syntax is enum class Color to declare the enum class.
Fill all three blanks to create an enum class Weekday with constants MONDAY and FRIDAY.
enum [1] [2] { [3], FRIDAY }
class keywordThe enum class declaration is enum class Weekday and constants are uppercase like MONDAY.
