In programming we use classes to represent real-world objects. Our objects are shapes, and each shape is made up of four independent parts. We will represent these independent blocks as objects. We'll do so by creating a brand new class named Block.
Just as we did with the Array, we will need to create a brand new Swift file named Block.
In the Block.swift file, replace its generated content (import Foundation) with the following: