Mini-exercises

  1. Create a struct Person in a new Sources file. This struct should have first, last

and fullName properties that are readable but not writable by the playground.

  1. Create a similar type, except make it a class and call it ClassyPerson. In the playground, subclass ClassyPerson with class Doctor and make a doctor’s fullName print the prefix "Dr.".

results matching ""

    No results matching ""