Sunday, 1 September 2013

REFACTORING in order to avoid duplication of fields and code netbeans

REFACTORING in order to avoid duplication of fields and code netbeans

I have created Logic gate in Net beans I have following classes
AND
OR
XOR
NOT
So I have used same input variables ie input1 and input2 and each class
has its own getter and setter for returning and setting. but i want create
a abstract base class and use REFACTORING in order to avoid duplication of
fields and code. So that each of the gate class should only include code
that is unique to them that is the method for computing outputs.
So I would like to know how to refactor the code
thanks in advance

No comments:

Post a Comment