enumitüüpides
An enum type, short for enumeration type, is a distinct data type that consists of a set of named integral constants. Essentially, it provides a way to define a variable that can only hold one of a predefined set of possible values. These values are typically represented by identifiers, making the code more readable and less prone to errors compared to using raw integer literals. For instance, instead of using numbers to represent days of the week, one could define an enum for days like `Sunday`, `Monday`, `Tuesday`, and so on. Each of these identifiers is internally mapped to an integer value, usually starting from zero by default, but this mapping can often be customized.
The primary benefit of using enum types is improved code clarity and maintainability. When a variable is