Abstract classes should be base classes

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
 +
=[http://orylyvejuza.co.cc Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page]=
 
:''All abstract classes must be base classes.'' --Riel's Heuristic 5.6, [[Arthur Riel 1996]]
 
:''All abstract classes must be base classes.'' --Riel's Heuristic 5.6, [[Arthur Riel 1996]]
 
==Description==
 
==Description==
 
From [[Arthur Riel 1996]]:
 
From [[Arthur Riel 1996]]:
<blockquote>
+
&lt;blockquote&gt;
 
''If a class cannot build objects of itself, then that class must be inherited by some derived class that does know how to build objects. If this is not the case, then the functionality of the base class can never be accessed by any object in the system, and therefore the class is irrelevant in the given domain.''
 
''If a class cannot build objects of itself, then that class must be inherited by some derived class that does know how to build objects. If this is not the case, then the functionality of the base class can never be accessed by any object in the system, and therefore the class is irrelevant in the given domain.''
</blockquote>
+
&lt;/blockquote&gt;
 
The corollary of which is Riel's heuristic #5.7: [[Avoid concrete base classes|All base classes should be abstract classes.]]
 
The corollary of which is Riel's heuristic #5.7: [[Avoid concrete base classes|All base classes should be abstract classes.]]
 
==See Also==
 
==See Also==

Revision as of 05:22, 24 November 2010

Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page

All abstract classes must be base classes. --Riel's Heuristic 5.6, Arthur Riel 1996

Description

From Arthur Riel 1996: <blockquote> If a class cannot build objects of itself, then that class must be inherited by some derived class that does know how to build objects. If this is not the case, then the functionality of the base class can never be accessed by any object in the system, and therefore the class is irrelevant in the given domain. </blockquote> The corollary of which is Riel's heuristic #5.7: All base classes should be abstract classes.

See Also

Personal tools