We already came across class, struct and enums where we declare properties and we can initialise those values on instance creation time.
Properties are two types
- Stored property
- Computed property
These properties will be holding values in their memory location. In the Person class we kept name and age as stored properties.
Some properties doesn’t require storage they will calculate or produce a value by calculating dynamically.
If you add fullName as a property in our Person class the this can use firstName and lastName to compute the fullName. This property depends on other stored or computed properties.