Version
Represents a version number with optional deprecated and release flag information.
This data class represents a semantic version number consisting of major, minor, and patch components. It additionally provides properties for indicating whether the version is deprecated and its release flag (alpha or beta).
Parameters
The major version number.
The minor version number.
The patch version number.
The release flag, indicating whether the version is an alpha or beta release (default: None).
Whether the version is deprecated (default: false).
The version qualifier for alpha or beta releases (default: 0).
The padding for the version qualifier (default: 2).
TODO Create an interface called Version that can be used to represent different types of versions, such as date versions and number versions
DateVersion : Version Example: DateVersion(2023, 11, 02)
NumericVersion : Version Example: NumericVersion(10, 3, 4)
TODO: Create an interface called Version that can be used to represent different types of versions, such as date versions and numeric versions.
Tasks:
Create an interface called Version.
Create a class called DateVersion that implements the Version interface.
Add the following properties to the DateVersion class:
year: The year of the version.
month: The month of the version.
day: The day of the version.
Create a class called NumericVersion that implements the Version interface.
Add the following properties to the NumericVersion class:
major: The major version number.
minor: The minor version number.
patch: The patch version number.
Update the interface to reference the new DateVersion and NumericVersion classes.
Examples: // Example of a date version val dateVersion = DateVersion(2023, 11, 2) // Example of a number version val numericVersion = NumericVersion(10, 3, 4)