This week's giveaways are in the MongoDB and Jobs Discussion forums. We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line! See this thread and this one for details.
B&S: Implementing interface and search interpretation
Joined: Jan 12, 2007
A few of us are working on our SCJD together here (what I mean is something like a study group to exchange ideas), and a couple of questions came up, so perhaps someone here can shed some light:
1) When the assignment says the Data.java "must implement the DBAccess interface", do you interpret that as implementing all the methods or can simply stub out those that are not required? For example, the create() method is not really used by the GUI as specified. So I can just define an empty method and put in choices.txt that it's to be implemented in the future or do I have to implement its functionality? My argument is that one need to implement the functionality and even consider it an automatic failure if you don't. But you can argue the other way, so like to see what people think here.
2) In the search method, the comment says to match the field starting with the criteria string. But we have a field specialties for the contractor, where it is a list of items. Do you still implement with the "starting" or actually do some interpretation? i.e. if the specialties is "Heating, Electrical", then a criteria of "Heating" would match, but "Electrical" would not. On the other hand, in real life, one would expect both to match.
Thanks for any input.
Vince<br />SCJP(1.4), SCWCD(1.4), SCJD (5.0)
Joined: Jan 04, 2007
"must implement" seems pretty clear to me. I wouldn't take any risks with those "musts"!