vendredi 5 août 2016

How should I design the Class?

Below is the sample code:

Interface I:
Method A 
Method B 
Class C implements I -> Base Class
Class D extends Class C
Overrides Method A i.e super.getMethodA() + adds few other functionality
Uses Method B i.e super.getMethodB() + adds few other functionality
returns certain value.

how should I design Class D, as it not only uses both Class C methods i.e Base class methods. And also wraps them to add few functionality.

Note: I have seen Decorative, Adapter pattern they both necessarily doesn't fit it.

Aucun commentaire:

Enregistrer un commentaire