1/8/2023 0 Comments Ruby oo email parser labWe could easily envision writing an app that models the environment of a dance performance. ![]() Let's think about a slightly different type of example, one that is less hierarchical. For example, a car is a type of vehicle, so it makes sense for the Car class to inherit from the Vehicle class. The subclass can be understood as a child or subordinate of the super class. Inheriting one class from another makes sense. We learned that through subclasses, a certain class under a super class, the subclass has access to all of the methods of its parent. ![]() In the previous lesson, we discussed the concept of inheritance. Learn about modules - another way to lend functionality across classes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |