Big Chemical Encyclopedia

Chemical substances, components, reactions, process design ...

Articles Figures Tables About

Code reuse through inheritance

Notice that now each of these two classes extends Molstructure class and all common code is removed from them. This result is because the common behaviors are inherited from the common superclass—Molstructure. Also notice that even some logic in the constructor is inherited from the superclass. Now we have achieved some code reuse through inheritance by having a class hierarchy. [Pg.19]

There are different types of code reuse. Here we focus on code reuse using a class hierarchy—in other words, through inheritance. [Pg.16]


See other pages where Code reuse through inheritance is mentioned: [Pg.16]    [Pg.17]    [Pg.19]    [Pg.16]    [Pg.17]    [Pg.19]   
See also in sourсe #XX -- [ Pg.16 , Pg.17 , Pg.18 , Pg.19 ]




SEARCH



Code reuse

Reuse/reusing

Reusing

Reusing code

© 2024 chempedia.info