oop - Similar logic but different classes (avoid duplication) -


i've got 4 similar class structures generated xsds, each 1 different version of api.

the thing is, have classes operate on these different class structures, deal of code same throughout structures. can't have interfaces each class since classes generated xsds. yet want remove duplication codebase...

what oo solution here?

thanks.

i use little object composition. define class holds shared functionality , keep instance member each of generated classes. try minimize amount of mutable state keep in class can test easier.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -