Inheritance is one of the central concepts of the object-oriented methods and has profound consequences on the software development process.It should be possible to define a class as inheriting from another.Software development involves a large number of classes many are variants of others. To control the resulting potential complexity, we need a classification mechanism, known as inheritance.
Multiple inheritance raises a few technical problems, in particular the resolution of name clashes. Any notation offering multiple inheritance must provide an adequate solution to these problems.It should be possible for a class to inherit from as many others as necessary,with an adequate mechanism for disambiguating name clashes.
Multiple inheritance raises the possibility of repeated inheritance,the case in which a class inherits from another through two or more paths.Precise rules should govern the fate of features under repeated inheritance allowing developers to choose separately for each repeatedly inherited feature between sharing and replication.
The combination of inheritance and genericity brings about an important technique constrained genericity, through which you can specify a class with a generic parameter that represents not an arbitrary type as with the earlier form of genericity but a type that is a descendant of a given class.The genericity mechanism should support the constrained form of genericity.
No comments:
Post a Comment