This page has been automatically translate with Google from the German language.

3 configuration options of software

3.2.4.2 Polymorphismus



In the object-oriented languages there are possibilities of submitting parts a program of an arranging view and so components define.111
This can e.g. be the central concept of the Polymorphismus, the multiformity of methods in object orientation. It is 'the possibility of using objects of suitable interfaces at run-time for each other. ' 112
This there are different kinds of the Polymophismus113:

Methods of the same name can be applied in such a way to objects of different classes. Methods of the superclasses are replaced on use of a method of the same name in Subklassen, one speak of overloading. Here only the suitable interface of the object, other information is important e.g. over the class, which belongs to the object, is not relevant. This one is not fixed when placing an inquiry before the execution on a certain implementation. Straight one with generic components such as Templates comes the Polymorphismus to carrying. Crucial is only the compatibility.
Objects can be exchanged also at run time, so that objects of different classes react with same inquiries differently. The definition, which method of the Sub or superclass is applied to the object, takes place only at the run time. This becomes the principle of the late connection114.
The draft samples already introduced use likewise the Polymorphismus. They help to identify interfaces and their elements and data and with it concomitantly flexibly re-usable manufacture software 115.

Evaluation of the Polymorphismus116
Advantages Disadvantages
  • Saves aufwändige instructions for SWITCH
  • Definition of methods which can be used takes place only during the execution of the code
  • Repeated use of names possible
  • The transmitter must know only that the addressee understands the message
  • Right assignment does not have to be examined on modification of the objects
  • Efficiency improvements concerning time and storage location with large programs
  • Reduces the code extent and simplifies the handling
  • The development of re-usable components promotes
  • The principle of the Polymorphismus can be developed even in application-neutral, re-usable Construstor Classes
  • Polymorphismus is applicable to each method
  • Implementation very aufwändig and requires experts
  • To convert testability with difficulty
  • Program sequence not derivably from the source code
  • All dynamic operational sequence must be tested
  • If Polymorphismus is repeated several times, the possible number of expiration paths explodes
Table 19: Evaluation of the Polymorphismus


 


Top| Home| << back | next >>
>> Home Page www.unitec.it <<