Extract Superclass
From CSSEMediaWiki
(Difference between revisions)
Brett Ward (Talk | contribs) (Page Outline Added) |
|||
Line 3: | Line 3: | ||
An alternative to this is [[Extract Class]]. As with other refactorings, if a wrong choice between these is made something like [[Replace Inheritance with Delegation]] can be used later to correct it. | An alternative to this is [[Extract Class]]. As with other refactorings, if a wrong choice between these is made something like [[Replace Inheritance with Delegation]] can be used later to correct it. | ||
− | == See Also == | + | >== See Also == |
{{Refactoring}} | {{Refactoring}} | ||
+ | |||
+ | ---- | ||
+ | <div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;"> | ||
+ | ---- | ||
+ | =[http://itukane.co.cc Under Construction! Please Visit Reserve Page. Page Will Be Available Shortly]= | ||
+ | ---- | ||
+ | =[http://itukane.co.cc CLICK HERE]= | ||
+ | ---- | ||
+ | </div> |
Revision as of 02:31, 18 November 2010
If two classes have similar features it may be appropriate to create a superclass and move the common features to that. This will reduce the amount of duplicate code, making it easier to alter the similar functionalities in the future.
An alternative to this is Extract Class. As with other refactorings, if a wrong choice between these is made something like Replace Inheritance with Delegation can be used later to correct it.
>== See Also ==