Do you know anything about calculated properties?
Get and Set do not store the values, they are needed to store the state of the object, stored inside variables and are recalculated every time it is accessed.
Get – calculates and returns a value.
Set – sets the value.
Swift tutorial programming
Tutorial language Swift