<- People Behind Informatics


All 0-9 A B C D E F G H I J K L M N O P Q R S T U V W XY Z




 
Inheritance
A subclass inherits all features of its superclass and can extend the superclass. Thus subclasses normally extend the set of fields and methods of the superclass. Inheritance proves especially suited to specialization of a more general class. A car is a specialization of vehicles; a convertible could be a specialization of a car. Here we could discuss which is the more general case, a sedan with a hard roof or a convertible. To resolve this conflict, we can define an abstract superclass Car, which simply serves to allow us to derive concrete subclasses, such as Sedan and Convertible. With the help of inheritance, we can produce a hierarchy of classes. . Class Car serves as abstract superclass [Source:Laszlo Böszörmenyi, Carsten Weich; Programming in Modula-3; 1996]
 

 

<- People Behind Informatics


Home  |  Top  |  Search  |  Gallery  | Glossary  | Sitemap  |  Making Of  |  Help