This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hello, I will try to keep this as simple as possible and try to describe my problem accurately. I have to 4 classes :
Two of them are depts and the other two are Actions... The idea is that each dept will utilize a particular action. (Some FileDeletion functionality...)
I thought interfaces would do the trick...
The dept classes came together very quickly. However, I've run into problems with my action classes and the implementation of the Action interface...
The problem I'm running into is that my two action objects can't implement the method the same. Each action class needs to supply the method different arguments to achieve the desired actions.
Obviously, this design is flawed, an Interface in this situation appears to just not make any sense. Is there maybe a different approach I can use? To achieve the desired affect? I could code the two object classes implementing all the needed methods, but that doesn't feel like a good OO design. I feel like I'm missing something.
JDBCSupport - An easy to use, light-weight JDBC framework -
Joined: Oct 10, 2008
Thank you for your reply... For an issue like this, (I'm assuming it's a common issue...) Would this suggestion/method be a common practice... It sounds like a nice solution, but I'm trying to stay close to good design principles...