Using inheritance has the drawback that adding functionality requires changes in both the upper and lower layers. At the same time, it is necessary to avoid disclosing details to the outside world. Loose coupling should be maintained to prevent a static connec…

