Can you explain me multilevel inheritance
Ask by Elena Glibart
Updated 22 Sep 2020
We will extend our single-level class hierarchy to multiple levels. A BankAccount inherits from Asset. A bank account can be one of two types: savings or checking. Therefore, we can say the following:
·A bank account “is an” asset.
·A savings account “is a” type of bank account.
·A checking account “is a” type of bank account.
Thus, we could add two more classes, called SavingsAccount and CheckingAccount, to our class hierarchy to represent these additional real-life entities. This is shown in the UML diagram here: