The basic operations needed are to get a matrix value and to put a matrix value. Based on these routines we can implement generic routines for printing matrices and adding matrices. If we would like to test the overall design we can implement a very rapid prototype by implementing the empty matrix, which is really very sparse. Our test program can now be changed and we can have operations with different matrix types. Polymorphism As seen before, a subclass is a class defined as an extension or modification of another class.
Subclasses are fundamental to object-oriented programming.
If so, it is this method which is activated. We check the immediate superclass of the already inspected class whether such a method is available. If so, it is this method which is activated. We repeat step 2. If we end up at the root of the inheritance tree, we have an error situation.