Now that you understand instance properties, type properties, and methods, it is time to spend some time in the Playground creating new classes and instances:
Exercise 1: Create the mutable versions of the following three classes that we analyzed in Chapter 1, Objects from the Real World to Playground:
Equilateral triangle (The
EquilateralTriangle
class)Square (The
Square
class)Regular hexagon (The
RegularHexagon
class)
Exercise 2: Create the immutable versions of the previously created classes