WHAT YOU WILL LEARN IN THIS CHAPTER:
In the previous chapter, you learned how classes are defined and how to add methods and properties to a class. In this chapter, you continue to explore object-oriented programming (OOP) by looking at another important topic—inheritance. In addition, you will also learn about access controls and how Swift’s interpretation of access control is different from conventional programming languages.
Class inheritance is one of the cornerstones of OOP. It basically means that a class can inherit the properties and methods from another class. Class inheritance enables a high degree of code reuse, allowing the same implementation to be adapted for another use. Swift fully supports the capability of class inheritance.