Classes and Structs - interim Practice!
So I was all ready to move onto the next course but really feel the need to crack the whole initialiser (which is one of the most difficult words to type by the way!) thing first. It makes more sense to have a little more practice with this! So for the first time since going back to Treehouse, I'm veering away from it - albeit briefly... First stop - the Apple Developer Guidance Structures and classes are general-purpose, flexible constructs that become the building blocks of your program’s code. You define properties and methods to add functionality to your structures and classes using the same syntax you use to define constants, variables, and functions. Straight from the text! All of that makes sense. Pasan also referred to them as 'Objects'. Ah hang on, that's an instance of a construct. Again, from the text, here is what both Structures and Classes can do: Define properties to store values Define methods to provide functionality Define subscripts t...