![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
A class can have many subclasses; the Food
class has four
subclasses.
No class can have more than one direct superclass, however. Accordingly, Smalltalk is said to support single inheritance only. Some other programming languages, such as C++, allow classes to have multiple superclasses; such languages are said to support multiple inheritance.